Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,9 @@ from query import VectaraQuery
|
|
3 |
import os
|
4 |
import gradio as gr
|
5 |
|
|
|
|
|
|
|
6 |
|
7 |
def isTrue(x) -> bool:
|
8 |
if isinstance(x, bool):
|
@@ -28,8 +31,10 @@ vq = VectaraQuery(cfg.api_key, cfg.customer_id, cfg.corpus_ids, cfg.prompt_name)
|
|
28 |
def respond(message, history):
|
29 |
if cfg.streaming:
|
30 |
# Call stream response and stream output
|
|
|
31 |
stream = vq.submit_query_streaming(message)
|
32 |
-
|
|
|
33 |
outputs = ""
|
34 |
for output in stream:
|
35 |
outputs += output
|
|
|
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):
|
|
|
31 |
def respond(message, history):
|
32 |
if cfg.streaming:
|
33 |
# Call stream response and stream output
|
34 |
+
# logging.debug(f'Streaming query called with message {message}')
|
35 |
stream = vq.submit_query_streaming(message)
|
36 |
+
|
37 |
+
|
38 |
outputs = ""
|
39 |
for output in stream:
|
40 |
outputs += output
|