philosopher-from-god commited on
Commit
42f9c56
·
verified ·
1 Parent(s): 75c11bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -2
app.py CHANGED
@@ -11,5 +11,25 @@ messages = [
11
  pipe(messages)
12
 
13
  # Create Gradio interface
14
- iface = gr.Interface(fn=generate_response, inputs="text", outputs="text")
15
- iface.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  pipe(messages)
12
 
13
  # Create Gradio interface
14
+ #
15
+ #iface = gr.Interface(fn=generate_response, inputs="text", outputs="text")
16
+ #iface.launch()
17
+
18
+ #
19
+ title = "Ask Rick a Question"
20
+ description = """
21
+ The bot was trained to answer questions based on Rick and Morty dialogues. Ask Rick anything!
22
+ <img src="https://huggingface.co/spaces/course-demos/Rick_and_Morty_QA/resolve/main/rick.png" width=200px>
23
+ """
24
+
25
+ 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."
26
+
27
+ iface = gr.Interface(
28
+ fn=predict,
29
+ inputs="textbox",
30
+ outputs="text",
31
+ title=title,
32
+ description=description,
33
+ article=article,
34
+ examples=[["What are you doing?"], ["Where should we time travel to?"]],
35
+ )iface.launch()