mingbaer commited on
Commit
5ed571d
·
verified ·
1 Parent(s): 1fccfdc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -1,12 +1,16 @@
1
  import gradio as gr
 
2
  # first, add your import lines
3
 
4
- def echo(message, history):
5
- return message
 
 
 
6
  # Code the function that your chatbot will run!
7
 
8
  print("Hello world")
9
- chatbot = gr.ChatInterface(echo, type="messages")
10
  # Use gradio to create an interface where your user can use ChatInterface --> needs a function as a parameter to run
11
 
12
  chatbot.launch()
 
1
  import gradio as gr
2
+ import random
3
  # first, add your import lines
4
 
5
+ def yes_or_no(message, history):
6
+ responses = ["Yes", "No"]
7
+ return responses.choice(responses)
8
+ # def echo(message, history):
9
+ # return message
10
  # Code the function that your chatbot will run!
11
 
12
  print("Hello world")
13
+ chatbot = gr.ChatInterface(yes_or_no, type="messages")
14
  # Use gradio to create an interface where your user can use ChatInterface --> needs a function as a parameter to run
15
 
16
  chatbot.launch()