Cass13 commited on
Commit
75829e1
·
verified ·
1 Parent(s): 5f9eb85

Coded yes or no function

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -1,8 +1,13 @@
1
  import gradio as gr
 
2
 
3
- def echo(message, history):
4
- return message #making an echo ting
5
 
6
- print("Hello, World!")
7
- chatbot = gr.ChatInterface(echo, type="messages") #defining my chatbot so user can interact
 
 
 
 
 
 
8
  chatbot.launch()
 
1
  import gradio as gr
2
+ import random
3
 
 
 
4
 
5
+
6
+ #def echo(message, history):
7
+ # return message #making an echo ting
8
+
9
+ def yes_or_no(message, history):
10
+ return random.choice(["Yes", "No"])
11
+
12
+ chatbot = gr.ChatInterface(yes_or_no, type="messages") #defining my chatbot so user can interact
13
  chatbot.launch()