ishaandtotoro commited on
Commit
bd7378f
·
verified ·
1 Parent(s): 29778c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -1,13 +1,19 @@
1
  import gradio as gr
2
-
3
 
4
  # Chat function: Respond with what we said
5
  def echo(message, history):
6
  return message
7
 
8
- print('Hello World')
9
 
10
- chatbot = gr.ChatInterface(echo)
 
 
 
 
 
 
 
11
 
12
  chatbot.launch()
13
 
 
1
  import gradio as gr
2
+ import random
3
 
4
  # Chat function: Respond with what we said
5
  def echo(message, history):
6
  return message
7
 
 
8
 
9
+ def yes_no(message, history):
10
+ responses = ['Yes', 'No']
11
+ return random.choice(responses)
12
+
13
+
14
+ # print('Hello World')
15
+
16
+ chatbot = gr.ChatInterface(yes_no, type='messages')
17
 
18
  chatbot.launch()
19