Spaces:
Sleeping
Sleeping
Commit ·
cc1d35d
1
Parent(s): cb61aec
Update app.py
Browse files
app.py
CHANGED
|
@@ -82,8 +82,8 @@ def fig2img(fig):
|
|
| 82 |
return img
|
| 83 |
|
| 84 |
|
| 85 |
-
description = """
|
| 86 |
-
title = """
|
| 87 |
image_in = gr.components.Image(label="Upload an image")
|
| 88 |
image_out = gr.components.Image()
|
| 89 |
prob_threshold_slider = gr.components.Slider(
|
|
@@ -95,9 +95,11 @@ classes_to_show = gr.components.Textbox(
|
|
| 95 |
label="Classes to filter (leave empty to detect all classes)",
|
| 96 |
)
|
| 97 |
|
|
|
|
|
|
|
| 98 |
gr.Interface(fn=model_inference,
|
| 99 |
-
inputs=
|
| 100 |
outputs=image_out,
|
| 101 |
title=title,
|
| 102 |
-
|
| 103 |
description=description).launch()
|
|
|
|
| 82 |
return img
|
| 83 |
|
| 84 |
|
| 85 |
+
description = """Upload an image and get the predicted classes"""
|
| 86 |
+
title = """Object Detection"""
|
| 87 |
image_in = gr.components.Image(label="Upload an image")
|
| 88 |
image_out = gr.components.Image()
|
| 89 |
prob_threshold_slider = gr.components.Slider(
|
|
|
|
| 95 |
label="Classes to filter (leave empty to detect all classes)",
|
| 96 |
)
|
| 97 |
|
| 98 |
+
inputs=[image_in, prob_threshold_slider, classes_to_show]
|
| 99 |
+
|
| 100 |
gr.Interface(fn=model_inference,
|
| 101 |
+
inputs=inputs,
|
| 102 |
outputs=image_out,
|
| 103 |
title=title,
|
| 104 |
+
examples=["CTH.png", "carplane.webp"],
|
| 105 |
description=description).launch()
|