consy commited on
Commit
9f5f8f8
·
verified ·
1 Parent(s): 51f5182

yes or no function

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -1,12 +1,17 @@
1
  import gradio as gr
 
2
  #import lines go at the top!
3
 
4
- def echo(message, history):
 
 
 
5
  #always need two inputs
6
- return message
 
7
  print("Hello, World")
8
 
9
- chatbot = gr.ChatInterface(echo, type='messages')
10
  #defining my chatbot so user can interact, see their conversation and send new messages
11
 
12
  chatbot.launch()
 
1
  import gradio as gr
2
+ import random
3
  #import lines go at the top!
4
 
5
+ def yes_or_no(message,history):
6
+ return random.choice(['Yes','No'])
7
+
8
+ #def echo(message, history):
9
  #always need two inputs
10
+ #return message
11
+
12
  print("Hello, World")
13
 
14
+ chatbot = gr.ChatInterface(yes_or_no, type='messages')
15
  #defining my chatbot so user can interact, see their conversation and send new messages
16
 
17
  chatbot.launch()