demetz commited on
Commit
367dde4
·
verified ·
1 Parent(s): 834791f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -1,10 +1,17 @@
1
  import gradio as gr
 
2
 
3
- def echo(message, history):
 
 
 
 
 
 
4
  return message
5
 
6
  print("Hello, world!")
7
 
8
- chatbot = gr.ChatInterface(echo, type="messages")
9
 
10
  chatbot.launch()
 
1
  import gradio as gr
2
+ import random
3
 
4
+ answers = ["the outlook is good", "no, sorry", "maybe", "ask me again"]
5
+
6
+ def magicEight(message, history):
7
+
8
+ message = random.choice(answers)
9
+
10
+
11
  return message
12
 
13
  print("Hello, world!")
14
 
15
+ chatbot = gr.ChatInterface(magicEight, type="messages")
16
 
17
  chatbot.launch()