tonicstl commited on
Commit
0b54ce5
·
verified ·
1 Parent(s): 866f79d

Update app.py

Browse files

added variety of responses

Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,11 +1,11 @@
1
  import gradio as gr
2
  import random
3
 
4
- def respond_yes_no_randomly(message, history):
5
- responses = ["yes", "no"]
6
  return random.choice(responses)
7
 
8
  print("Hello, world!")
9
 
10
- chatbot = gr.ChatInterface(respond_yes_no_randomly, type = "messages", title = "Yes/No Bot") #chatbot UI = conversation history and user input
11
  chatbot.launch() #displays the chatbot
 
1
  import gradio as gr
2
  import random
3
 
4
+ def response_system(message, history):
5
+ responses = ["yes", "no", "maybe", "I don't think so", "I think so", "What kind of a question is that?", "Are you sure you want to know?", "I'm not telling XD", "You ask too many questions", "That depends on you", "Without a doubt"]
6
  return random.choice(responses)
7
 
8
  print("Hello, world!")
9
 
10
+ chatbot = gr.ChatInterface(response_system, type = "messages", title = "8 Ball") #chatbot UI = conversation history and user input
11
  chatbot.launch() #displays the chatbot