Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -95,18 +95,19 @@ def predict(image):
|
|
95 |
predictions = e
|
96 |
return predictions
|
97 |
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
|
|
|
95 |
predictions = e
|
96 |
return predictions
|
97 |
|
98 |
+
title = "Ask Rick a Question"
|
99 |
+
description = """
|
100 |
+
<center>
|
101 |
+
The bot was trained to answer questions based on Rick and Morty dialogues. Ask Rick anything!
|
102 |
+
<img src="https://huggingface.co/spaces/course-demos/Rick_and_Morty_QA/resolve/main/rick.png" width=200px>
|
103 |
+
</center>
|
104 |
+
"""
|
105 |
+
|
106 |
+
gr.Interface(
|
107 |
+
predict,
|
108 |
+
inputs=gr.inputs.Image(label="Upload a profile picture of a single person", type="pil"),
|
109 |
+
outputs=("text"),
|
110 |
+
title= title,
|
111 |
+
description = description
|
112 |
+
examples=["ex0.jpg","ex4.jpg", "ex1.jpg","ex2.jpg","ex3.jpg","ex5.jpg","ex6.jpg"]
|
113 |
+
).launch()
|