ishrat5e commited on
Commit
c74c1a0
·
verified ·
1 Parent(s): 183fa2e

Added in random message yes.no

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