Spaces:
Sleeping
Sleeping
Update app.py
#3
by
Gosula
- opened
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('
|
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
|
140 |
-
examples = [['
|
141 |
-
gr.Interface(inference, inputs, outputs, title=title, examples=examples, description=description, theme='
|
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)
|