rkastro commited on
Commit
f0cc2b0
·
verified ·
1 Parent(s): 515a5b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -30,5 +30,13 @@ def get_text_response(user_message,history):
30
 
31
  demo = gr.ChatInterface(get_text_response)
32
 
 
 
 
 
 
 
 
 
33
  if __name__ == "__main__":
34
- demo.launch() #To create a public link, set `share=True` in `launch()`. To enable errors and logs, set `debug=True` in `launch()`.
 
30
 
31
  demo = gr.ChatInterface(get_text_response)
32
 
33
+ import random
34
+ import gradio as gr
35
+
36
+ def random_response(message, history):
37
+ return random.choice(["Yes", "No"])
38
+
39
+ demo = gr.ChatInterface(random_response, type="messages", autofocus=False)
40
+
41
  if __name__ == "__main__":
42
+ demo.launch()