diyapg commited on
Commit
00a23fd
·
verified ·
1 Parent(s): eacf08a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -1,11 +1,13 @@
1
  import gradio as gr
 
 
 
 
 
2
 
3
- def echo(message, history):
4
- return message
5
 
6
- print("hello, world!")
7
 
8
- chatbot = gr.ChatInterface(echo, type="messages") #chatbot UI - conversation history and user input
9
 
10
  chatbot.launch()
11
 
 
1
  import gradio as gr
2
+ import random #added here
3
+
4
+ def respond_yes_or_no_randomaly(message, history): #added here
5
+ responses = ["yes", "no"]
6
+ return random.choice(responses) #added here
7
 
 
 
8
 
 
9
 
10
+ chatbot = gr.ChatInterface(respond_yes_or_no_randomaly, type="messages", title="yes no bot") #chatbot UI - conversation history and user input
11
 
12
  chatbot.launch()
13