KatieKhamarkhanova commited on
Commit
22ddb67
·
verified ·
1 Parent(s): 5f26235

coded yes or no function

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -1,10 +1,14 @@
 
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 random
2
  import gradio as gr
3
 
4
+ # def echo(message, history):
5
+ # return message
6
+
7
+ def yes_no(message, history):
8
+ return random.choice(["yes", "no"])
9
 
10
  print("Hello, world!")
11
 
12
+ chatbot = gr.ChatInterface(yes_no, type="messages")
13
 
14
  chatbot.launch()