sjdata commited on
Commit
7a5420b
·
1 Parent(s): e7f76c0

Add application file

Browse files
Files changed (1) hide show
  1. app.py +21 -0
app.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def yes_man(message, history):
4
+ if messages.endswith("?"):
5
+ return "Yes"
6
+ else:
7
+ return "Ask me anything!"
8
+
9
+ gr.ChatInterface(
10
+ yes_man,
11
+ chatbot=gr.Chatbot(height=300),
12
+ textbox=gr.Textbox(placeholder="Ask me a yes or no question")
13
+ title="Yes Man",
14
+ description="Ask Yes Man any question",
15
+ theme="soft",
16
+ examples=["Hello", "Am I cool?", "Are tomatoes vegetables?"],
17
+ cache_examples=True,
18
+ retry_btn=None,
19
+ undo_btn="Delete Previous",
20
+ clear_btn="Clear",
21
+ ).launch()