Heta111 commited on
Commit
237d95e
·
verified ·
1 Parent(s): 1bc497b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -1,10 +1,13 @@
1
  import gradio as gr
 
2
  # import lines go at the top, any libraries I need to import go above ^^
3
 
4
- def echo(message, history):
5
- return message
 
 
6
 
7
  print("Hello World!")
8
- chatbot = gr.ChatInterface(echo, type="messages")
9
 
10
  chatbot.launch()
 
1
  import gradio as gr
2
+ import random
3
  # import lines go at the top, any libraries I need to import go above ^^
4
 
5
+ # def echo(message, history):
6
+ # return message
7
+ def yes_or_no(message, history):
8
+ return random.choice(['Yes', 'No'])
9
 
10
  print("Hello World!")
11
+ chatbot = gr.ChatInterface(yes_or_no, type="messages")
12
 
13
  chatbot.launch()