sharvanid commited on
Commit
7b065dd
·
verified ·
1 Parent(s): b818c1a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -1,9 +1,17 @@
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
 
5
  def echo(message, history):
6
  return(message)
7
+
8
+ def yes_no(message, history):
9
+ responses = ["Yes", "No"]
10
+ return random.choice(responses)
11
+
12
+ print("Hello, World!")
13
+
14
+ chatbot = gr.ChatInterface(yes_no, type = "messages")
15
 
16
  chatbot.launch()
17