Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,21 +8,23 @@ def predict(image):
|
|
| 8 |
return r_image
|
| 9 |
|
| 10 |
title = "MASFNet: Multi-scale Adaptive Sampling Fusion Network for Object Detection in Adverse Weather"
|
| 11 |
-
description = ""
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
|
|
|
|
|
|
|
|
| 8 |
return r_image
|
| 9 |
|
| 10 |
title = "MASFNet: Multi-scale Adaptive Sampling Fusion Network for Object Detection in Adverse Weather"
|
| 11 |
+
description = """
|
| 12 |
+
The bot was trained to answer questions based on Rick and Morty dialogues. Ask Rick anything!
|
| 13 |
+
<img src="https://huggingface.co/spaces/course-demos/Rick_and_Morty_QA/resolve/main/rick.png" width=200px>
|
| 14 |
+
"""
|
| 15 |
+
|
| 16 |
+
article = "Check out [the original Rick and Morty Bot](https://huggingface.co/spaces/kingabzpro/Rick_and_Morty_Bot) that this demo is based off of."
|
| 17 |
+
|
| 18 |
+
def reset_interface():
|
| 19 |
+
return gr.update(value=None), gr.update(visible=False)
|
| 20 |
+
|
| 21 |
+
with gr.Blocks() as demo:
|
| 22 |
+
img_input = gr.Image(type="pil", label="Upload an Image")
|
| 23 |
+
submit_btn = gr.Button("Submit")
|
| 24 |
+
output = gr.Image(type="pil", label="Prediction Result")
|
| 25 |
+
|
| 26 |
+
submit_btn.click(fn=predict, inputs=img_input, outputs=output)
|
| 27 |
+
|
| 28 |
+
demo.load(reset_interface, None, [output])
|
| 29 |
+
|
| 30 |
+
demo.launch()
|