AmbikaP commited on
Commit
fb04f70
·
verified ·
1 Parent(s): 0aa4654

yes_no function

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -1,11 +1,15 @@
1
  import gradio as gr
 
2
  # import lines go at the top! any libraries I need to import
3
 
4
- def echo(message, history):
5
- return message
 
 
 
6
 
7
  print("Hello world!")
8
- chatbot = gr.ChatInterface(echo, type="messages")
9
  # defining my chatbot so that the user can interact, see their convo history and send new messages
10
 
11
  chatbot.launch()
 
1
  import gradio as gr
2
+ import random
3
  # import lines go at the top! any libraries I need to import
4
 
5
+ #def echo(message, history):
6
+ #return message
7
+
8
+ def yes_or_no(message,history):
9
+ return random.choice(["yes","no"])
10
 
11
  print("Hello world!")
12
+ chatbot = gr.ChatInterface(yes_or_no, type="messages")
13
  # defining my chatbot so that the user can interact, see their convo history and send new messages
14
 
15
  chatbot.launch()