njgroene commited on
Commit
c72f26a
1 Parent(s): ae653e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -15
app.py CHANGED
@@ -95,18 +95,19 @@ def predict(image):
95
  predictions = e
96
  return predictions
97
 
98
- demo = gr.Blocks()
99
-
100
- with demo:
101
- gr.Markdown(
102
- """
103
- # Hello World!
104
- Start typing below to see the output.
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="Estimate age and gender from profile picture",
111
- examples=["ex0.jpg","ex4.jpg", "ex1.jpg","ex2.jpg","ex3.jpg","ex5.jpg","ex6.jpg"]
112
- ).launch()
 
 
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()