LayaPrakash commited on
Commit
cdcc40c
·
verified ·
1 Parent(s): 7391f50

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -1,8 +1,12 @@
1
  import gradio as gr
 
2
 
3
- def echo(message, history):
4
- return message
 
 
 
5
 
6
- chatbot = gr.ChatInterface(echo, type = 'messages')
7
 
8
  chatbot.launch()
 
1
  import gradio as gr
2
+ import random
3
 
4
+ def random_message(message, history):
5
+ choices = ["yes", "no"]
6
+ chat_answer = random.choice(choices)
7
+ #use random to select ones of those choices
8
+ return chat_answer
9
 
10
+ chatbot = gr.ChatInterface(random_message, type = 'messages')
11
 
12
  chatbot.launch()