anna1au commited on
Commit
cf60c02
·
verified ·
1 Parent(s): 06b70ad

Replaced echo with a yes or no function

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,8 +1,9 @@
1
  import gradio as gr
 
2
 
3
- def echo(message, history):
4
- return message
5
 
6
  print ("Hello, world!")
7
- chatBot = gr.ChatInterface(echo, type = "messages")
8
  chatBot.launch()
 
1
  import gradio as gr
2
+ import random
3
 
4
+ def yes_or_no(message, history):
5
+ return random.choice(["Yes","No"])
6
 
7
  print ("Hello, world!")
8
+ chatBot = gr.ChatInterface(yes_or_no, type = "messages")
9
  chatBot.launch()