Spaces:
Running
Running
Change link to dataset (#20)
Browse files* enable deep memory
* point to dev vector store with tensor_db
* rename blocks to demo for autoreload without args
app.py
CHANGED
@@ -87,9 +87,8 @@ def get_answer(history, sources: Optional[list[str]] = None):
|
|
87 |
yield history, completion
|
88 |
|
89 |
|
90 |
-
|
91 |
-
|
92 |
-
with block:
|
93 |
with gr.Row():
|
94 |
gr.Markdown(
|
95 |
"<h3><center>Buster 🤖: A Question-Answering Bot for your documentation</center></h3>"
|
@@ -132,5 +131,5 @@ with block:
|
|
132 |
).then(add_sources, inputs=[chatbot, response], outputs=[chatbot])
|
133 |
|
134 |
|
135 |
-
|
136 |
-
|
|
|
87 |
yield history, completion
|
88 |
|
89 |
|
90 |
+
demo = gr.Blocks()
|
91 |
+
with demo:
|
|
|
92 |
with gr.Row():
|
93 |
gr.Markdown(
|
94 |
"<h3><center>Buster 🤖: A Question-Answering Bot for your documentation</center></h3>"
|
|
|
131 |
).then(add_sources, inputs=[chatbot, response], outputs=[chatbot])
|
132 |
|
133 |
|
134 |
+
demo.queue(concurrency_count=16)
|
135 |
+
demo.launch(debug=True, share=False)
|
cfg.py
CHANGED
@@ -17,7 +17,7 @@ ACTIVELOOP_TOKEN = os.getenv("ACTIVELOOP_TOKEN")
|
|
17 |
if ACTIVELOOP_TOKEN is None:
|
18 |
logger.warning("No activeloop token found, you will not be able to fetch data.")
|
19 |
|
20 |
-
DEEPLAKE_DATASET = os.getenv("DEEPLAKE_DATASET", "
|
21 |
DEEPLAKE_ORG = os.getenv("DEEPLAKE_ORG", "towards_ai")
|
22 |
|
23 |
# if you want to use a local dataset, set the env. variable, it overrides all others
|
@@ -70,6 +70,7 @@ A user will now submit a question. Respond 'true' if it is valid, respond 'false
|
|
70 |
"embedding_model": "text-embedding-ada-002",
|
71 |
"exec_option": "compute_engine",
|
72 |
"use_tql": True,
|
|
|
73 |
},
|
74 |
documents_answerer_cfg={
|
75 |
"no_documents_message": "No blog posts are available for this question.",
|
|
|
17 |
if ACTIVELOOP_TOKEN is None:
|
18 |
logger.warning("No activeloop token found, you will not be able to fetch data.")
|
19 |
|
20 |
+
DEEPLAKE_DATASET = os.getenv("DEEPLAKE_DATASET", "dev_vector_store")
|
21 |
DEEPLAKE_ORG = os.getenv("DEEPLAKE_ORG", "towards_ai")
|
22 |
|
23 |
# if you want to use a local dataset, set the env. variable, it overrides all others
|
|
|
70 |
"embedding_model": "text-embedding-ada-002",
|
71 |
"exec_option": "compute_engine",
|
72 |
"use_tql": True,
|
73 |
+
"deep_memory": True,
|
74 |
},
|
75 |
documents_answerer_cfg={
|
76 |
"no_documents_message": "No blog posts are available for this question.",
|