Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ from dotenv import load_dotenv
|
|
| 20 |
load_dotenv()
|
| 21 |
HF_token = os.environ["HF_TOKEN"]
|
| 22 |
# process all files and get the vectorstores collections
|
| 23 |
-
vectorstores = process_pdf()
|
| 24 |
|
| 25 |
# -------------------------------------------------------------
|
| 26 |
# Functions
|
|
@@ -88,9 +88,13 @@ async def chat(query,history,sources,reports):
|
|
| 88 |
|
| 89 |
|
| 90 |
if reports is not None:
|
| 91 |
-
|
|
|
|
|
|
|
| 92 |
else:
|
| 93 |
-
|
|
|
|
|
|
|
| 94 |
|
| 95 |
|
| 96 |
yield history,docs_html
|
|
@@ -186,7 +190,7 @@ with gr.Blocks(title="Audit Q&A", css= "style.css", theme=theme,elem_id = "main-
|
|
| 186 |
report_list,
|
| 187 |
label="Or select specific reports",
|
| 188 |
multiselect=True,
|
| 189 |
-
value=
|
| 190 |
interactive=True,)
|
| 191 |
|
| 192 |
############### tab for Question selection ###############
|
|
|
|
| 20 |
load_dotenv()
|
| 21 |
HF_token = os.environ["HF_TOKEN"]
|
| 22 |
# process all files and get the vectorstores collections
|
| 23 |
+
#vectorstores = process_pdf()
|
| 24 |
|
| 25 |
# -------------------------------------------------------------
|
| 26 |
# Functions
|
|
|
|
| 88 |
|
| 89 |
|
| 90 |
if reports is not None:
|
| 91 |
+
print(reports)
|
| 92 |
+
print(sources)
|
| 93 |
+
#vectorstore = vectorstores[sources]
|
| 94 |
else:
|
| 95 |
+
print(reports)
|
| 96 |
+
print(sources)
|
| 97 |
+
#vectorstore = vectorstores["allreports"]
|
| 98 |
|
| 99 |
|
| 100 |
yield history,docs_html
|
|
|
|
| 190 |
report_list,
|
| 191 |
label="Or select specific reports",
|
| 192 |
multiselect=True,
|
| 193 |
+
value=[],
|
| 194 |
interactive=True,)
|
| 195 |
|
| 196 |
############### tab for Question selection ###############
|