Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,23 +7,22 @@ def predict(image):
|
|
| 7 |
r_image = yolo.detect_image(image)
|
| 8 |
return r_image
|
| 9 |
|
| 10 |
-
title = "MASFNet:
|
| 11 |
description = ""
|
| 12 |
-
article = ""
|
| 13 |
|
| 14 |
def reset_interface():
|
| 15 |
return gr.update(value=None), gr.update(visible=False)
|
| 16 |
|
| 17 |
example_images = [
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
]
|
| 28 |
|
| 29 |
with gr.Blocks() as demo:
|
|
@@ -39,10 +38,11 @@ with gr.Blocks() as demo:
|
|
| 39 |
|
| 40 |
submit_btn.click(fn=predict, inputs=img_input, outputs=output)
|
| 41 |
demo.load(reset_interface, None, [output])
|
| 42 |
-
gr.Examples(
|
| 43 |
-
examples=example_images,
|
| 44 |
-
inputs=img_input,
|
| 45 |
-
)
|
| 46 |
-
|
| 47 |
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
r_image = yolo.detect_image(image)
|
| 8 |
return r_image
|
| 9 |
|
| 10 |
+
title = "MASFNet: Multiscale Adaptive Sampling Fusion Network for Object Detection in Adverse Weather"
|
| 11 |
description = ""
|
|
|
|
| 12 |
|
| 13 |
def reset_interface():
|
| 14 |
return gr.update(value=None), gr.update(visible=False)
|
| 15 |
|
| 16 |
example_images = [
|
| 17 |
+
"img/1.png",
|
| 18 |
+
"img/2.png",
|
| 19 |
+
"img/3.png",
|
| 20 |
+
"img/4.png",
|
| 21 |
+
"img/5.png",
|
| 22 |
+
"img/6.png",
|
| 23 |
+
"img/7.png",
|
| 24 |
+
"img/8.png",
|
| 25 |
+
"img/10.png",
|
| 26 |
]
|
| 27 |
|
| 28 |
with gr.Blocks() as demo:
|
|
|
|
| 38 |
|
| 39 |
submit_btn.click(fn=predict, inputs=img_input, outputs=output)
|
| 40 |
demo.load(reset_interface, None, [output])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
+
with gr.Row():
|
| 43 |
+
gr.Examples(
|
| 44 |
+
examples=example_images,
|
| 45 |
+
inputs=img_input,
|
| 46 |
+
)
|
| 47 |
+
|
| 48 |
+
demo.launch(share=True)
|