shravbx commited on
Commit
befe52d
·
verified ·
1 Parent(s): 9fbcdca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -1,7 +1,8 @@
1
- import gradio as gr
2
- import random as rn
3
- def respond_yes_no_randomly(message, history):
4
- responses = ["yes","no"]
5
- return rn.choice(responses)
6
- chatbot = gr.ChatInterface(respond_yes_no_randomly,type = 'messages')
7
- chatbot.launch()
 
 
1
+ import gradio as gr #importing gradio
2
+ import random
3
+ def respond_y_or_n_randomly(message, history):
4
+ responses = ["yes","no"]
5
+ return random.choice(responses)
6
+ #all print statements will be shown in the log after committing the changes to the main.
7
+ chatbot = gr.ChatInterface(respond_y_or_n_randomly, type = 'messages', title="Yes no bot") #builds chatbot UI - conversation history and user input
8
+ chatbot.launch() # launches the chatbot.