leahb commited on
Commit
57b5edf
·
verified ·
1 Parent(s): fa970e9

imported the random library and made the message a random choice (yes or no)

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