david-oplatka commited on
Commit
55c7d01
·
verified ·
1 Parent(s): b962cc5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -3,10 +3,6 @@ from query import VectaraQuery
3
  import os
4
  import gradio as gr
5
 
6
- import logging
7
- logging.basicConfig(level=logging.DEBUG)
8
-
9
-
10
  def isTrue(x) -> bool:
11
  if isinstance(x, bool):
12
  return x
@@ -21,7 +17,8 @@ cfg = OmegaConf.create({
21
  'description': os.environ['description'],
22
  'source_data_desc': os.environ['source_data_desc'],
23
  'streaming': isTrue(os.environ.get('streaming', False)),
24
- 'prompt_name': os.environ.get('prompt_name', None)
 
25
  })
26
 
27
 
@@ -56,7 +53,7 @@ cfg.description = f'''<center> <h2>{cfg.description}</h2>
56
  '''
57
 
58
  demo = gr.ChatInterface(respond, title = cfg.title, description = cfg.description,
59
- chatbot = gr.Chatbot(value = [[None, "How may I help you?"]], scale=3), examples = ["Hello", "Hi", "How are you?"])
60
 
61
 
62
  if __name__ == "__main__":
 
3
  import os
4
  import gradio as gr
5
 
 
 
 
 
6
  def isTrue(x) -> bool:
7
  if isinstance(x, bool):
8
  return x
 
17
  'description': os.environ['description'],
18
  'source_data_desc': os.environ['source_data_desc'],
19
  'streaming': isTrue(os.environ.get('streaming', False)),
20
+ 'prompt_name': os.environ.get('prompt_name', None),
21
+ 'examples': os.environ.get('examples', None)
22
  })
23
 
24
 
 
53
  '''
54
 
55
  demo = gr.ChatInterface(respond, title = cfg.title, description = cfg.description,
56
+ chatbot = gr.Chatbot(value = [[None, "How may I help you?"]], scale=3), examples = cfg.examples)
57
 
58
 
59
  if __name__ == "__main__":