Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,15 +21,8 @@ cfg = OmegaConf.create({
|
|
| 21 |
'examples': os.environ.get('examples', None)
|
| 22 |
})
|
| 23 |
|
| 24 |
-
import logging
|
| 25 |
-
logging.basicConfig(level=logging.DEBUG)
|
| 26 |
-
|
| 27 |
-
logging.debug(f'examples: {cfg.examples} of type: {type(cfg.examples)}')
|
| 28 |
-
|
| 29 |
-
|
| 30 |
vq = VectaraQuery(cfg.api_key, cfg.customer_id, cfg.corpus_ids, cfg.prompt_name)
|
| 31 |
|
| 32 |
-
|
| 33 |
def respond(message, history):
|
| 34 |
if cfg.streaming:
|
| 35 |
# Call stream response and stream output
|
|
@@ -59,8 +52,6 @@ if cfg.examples:
|
|
| 59 |
else:
|
| 60 |
app_examples = None
|
| 61 |
|
| 62 |
-
logging.debug(f'Examples before function call: {app_examples}; type: {type(app_examples)}')
|
| 63 |
-
|
| 64 |
demo = gr.ChatInterface(respond, title = cfg.title, description = cfg.description,
|
| 65 |
chatbot = gr.Chatbot(value = [[None, "How may I help you?"]], scale=3), examples = app_examples)
|
| 66 |
|
|
|
|
| 21 |
'examples': os.environ.get('examples', None)
|
| 22 |
})
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
vq = VectaraQuery(cfg.api_key, cfg.customer_id, cfg.corpus_ids, cfg.prompt_name)
|
| 25 |
|
|
|
|
| 26 |
def respond(message, history):
|
| 27 |
if cfg.streaming:
|
| 28 |
# Call stream response and stream output
|
|
|
|
| 52 |
else:
|
| 53 |
app_examples = None
|
| 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 = app_examples)
|
| 57 |
|