codersoul commited on
Commit
b7a97d7
·
verified ·
1 Parent(s): 87c8175

Added in random message yes or no

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -1,8 +1,9 @@
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
+ def random_response(message, history):
4
+ resonse_options = ["yes", "no"]
5
+ return random.choice(response_options)
6
 
7
+ chatbot = gr.ChatInterface(random_response)
8
 
9
  chatbot.launch()