Gosula commited on
Commit
f3a7aa1
1 Parent(s): 64797fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -17,7 +17,7 @@ import matplotlib.patches as patches
17
 
18
  # Load the model
19
  model = YoloVersion3( )
20
- model.load_state_dict(torch.load('/content/drive/MyDrive/sunandini/Checkpoint/lightning_logs/version_4/checkpoints/Yolov3.pth', map_location=torch.device('cpu')), strict=False)
21
  model.eval()
22
 
23
  # Anchor
@@ -136,7 +136,7 @@ def inference(inp_image):
136
  inputs = gr.inputs.Image(label="Original Image")
137
  outputs = gr.outputs.Image(type="pil",label="Output Image")
138
  title = "YOLOv3 model trained on PASCAL VOC Dataset"
139
- description = "YOLOv3 Gradio demo for object detection"
140
- examples = [['/content/car1.jpg'], ['/content/home.jpg']]
141
- gr.Interface(inference, inputs, outputs, title=title, examples=examples, description=description, theme='abidlabs/dracula_revamped').launch(
142
  debug=False)
 
17
 
18
  # Load the model
19
  model = YoloVersion3( )
20
+ model.load_state_dict(torch.load('Yolov3.pth', map_location=torch.device('cpu')), strict=False)
21
  model.eval()
22
 
23
  # Anchor
 
136
  inputs = gr.inputs.Image(label="Original Image")
137
  outputs = gr.outputs.Image(type="pil",label="Output Image")
138
  title = "YOLOv3 model trained on PASCAL VOC Dataset"
139
+ description = "YOLOv3 object detection using Gradio demo"
140
+ examples = [['car.jpg'], ['home.jpg'],['train.jpg'],['train_persons.jpg']]
141
+ gr.Interface(inference, inputs, outputs, title=title, examples=examples, description=description, theme='xiaobaiyuan/theme_brief').launch(
142
  debug=False)