giannicrivello commited on
Commit
92478d4
·
1 Parent(s): e7a438e

test chat bot

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -1,8 +1,11 @@
1
  import gradio as gr
2
 
3
 
 
 
4
  def yes_man(message, history):
5
  if message.endswith("?"):
 
6
  return "Yes"
7
  else:
8
  return "Ask me anything!"
@@ -14,7 +17,7 @@ gr.ChatInterface(
14
  title="Yes Man",
15
  description="Ask Yes Man any question",
16
  theme="soft",
17
- examples=["Hello", "Am I cool?", "Are tomatoes vegetables?"],
18
  cache_examples=True,
19
  retry_btn=None,
20
  undo_btn="Delete Previous",
 
1
  import gradio as gr
2
 
3
 
4
+ examples = []
5
+
6
  def yes_man(message, history):
7
  if message.endswith("?"):
8
+ examples.append(message)
9
  return "Yes"
10
  else:
11
  return "Ask me anything!"
 
17
  title="Yes Man",
18
  description="Ask Yes Man any question",
19
  theme="soft",
20
+ examples=examples,
21
  cache_examples=True,
22
  retry_btn=None,
23
  undo_btn="Delete Previous",