gvartanian2010 commited on
Commit
9c6bc5d
·
verified ·
1 Parent(s): 90b822c

added in random message yes or no

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,8 +1,10 @@
1
  import gradio as gr
 
2
 
3
- def echo(message, history):
4
- return message
 
5
 
6
- chatbot = gr.ChatInterface(echo)
7
 
8
  chatbot.launch()
 
1
  import gradio as gr
2
+ import random
3
 
4
+ def random_response(message, history):
5
+ response_options = ["yes", "no"]
6
+ return random.choice(ressponse_options)
7
 
8
+ chatbot = gr.ChatInterface(random_response)
9
 
10
  chatbot.launch()