Spaces:
Sleeping
Sleeping
app update
Browse files
app.py
CHANGED
@@ -71,22 +71,23 @@ title = "Custom YOLOv3"
|
|
71 |
description = "Pytorch Lightning implemetation of YOLOv3 on Pascal VOC dataset.\
|
72 |
Supported classes are aeroplane, bicycle, bird, boat, bottle, bus, car, cat, chair, cow, dining table, dog, horse, motorbike, person, potted plant, sheep, sofa, train, and TV/monitor."
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
|
|
81 |
|
82 |
demo = gr.Interface(model_inference, inputs=[gr.Image(label="Input an image"),
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
outputs=[gr.Gallery(label="Model Outputs", rows=2, columns=1)],
|
89 |
-
title=title, description=description)
|
90 |
demo.launch()
|
91 |
|
92 |
|
|
|
71 |
description = "Pytorch Lightning implemetation of YOLOv3 on Pascal VOC dataset.\
|
72 |
Supported classes are aeroplane, bicycle, bird, boat, bottle, bus, car, cat, chair, cow, dining table, dog, horse, motorbike, person, potted plant, sheep, sofa, train, and TV/monitor."
|
73 |
|
74 |
+
examples = [["examples/example1.jpg"],
|
75 |
+
["examples/example2.jpg"],
|
76 |
+
["examples/example3.jpg"],
|
77 |
+
["examples/example4.jpg"],
|
78 |
+
["examples/example5.jpg"],
|
79 |
+
["examples/example6.jpg"],
|
80 |
+
["examples/example7.jpg"],
|
81 |
+
["examples/example8.jpg"]]
|
82 |
|
83 |
demo = gr.Interface(model_inference, inputs=[gr.Image(label="Input an image"),
|
84 |
+
gr.Slider(0, 1, value=0.5, label="IOU Threshold"),
|
85 |
+
gr.Slider(0, 1, value=0.4, label="Threshold"),
|
86 |
+
gr.Radio(["Yes", "No"], value="No" , label="Show GradCAM outputs"),
|
87 |
+
gr.Slider(0, 1, value=0.5, label="Opacity of GradCAM"),
|
88 |
+
gr.Slider(-2, -1, value=-1, step=1, label="Which Layer?")],
|
89 |
+
outputs=[gr.Gallery(label="Model Outputs", rows=2, columns=1, object_fit="contain", height="auto")],
|
90 |
+
title=title, description=description, examples=examples)
|
91 |
demo.launch()
|
92 |
|
93 |
|