Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -91,7 +91,8 @@ def detect_objects(model_name,url,image_upload,threshold):
|
|
91 |
viz_img = visualize_prediction(image, processed_outputs, threshold, model.config.id2label)
|
92 |
|
93 |
return viz_img
|
94 |
-
|
|
|
95 |
gr.Interface(
|
96 |
fn = detect_objects,
|
97 |
inputs = [options,
|
@@ -100,4 +101,5 @@ gr.Interface(
|
|
100 |
gr.Slider(minimum=0.2,maximum=1,value=0.7,label='Prediction Threshold')],
|
101 |
outputs=gr.Image(shape=(450,450)),
|
102 |
title = title,
|
103 |
-
description=description
|
|
|
|
91 |
viz_img = visualize_prediction(image, processed_outputs, threshold, model.config.id2label)
|
92 |
|
93 |
return viz_img
|
94 |
+
|
95 |
+
examples = [['https://media-cldnry.s-nbcnews.com/image/upload/t_fit-1500w,f_auto,q_auto:best/newscms/2020_14/3290756/200331-wall-street-ew-343p.jpg',['IMG_5204.JPG'],[0.7]]
|
96 |
gr.Interface(
|
97 |
fn = detect_objects,
|
98 |
inputs = [options,
|
|
|
101 |
gr.Slider(minimum=0.2,maximum=1,value=0.7,label='Prediction Threshold')],
|
102 |
outputs=gr.Image(shape=(450,450)),
|
103 |
title = title,
|
104 |
+
description=description,
|
105 |
+
examples=examples).launch()
|