Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ async def chat(query,history,sources,reports):
|
|
44 |
|
45 |
# Prepare default values
|
46 |
if len(sources) == 0:
|
47 |
-
sources = ["
|
48 |
|
49 |
if len(reports) == 0:
|
50 |
reports = []
|
@@ -219,21 +219,15 @@ with gr.Blocks(title="Audit Q&A", css="style.css", theme=theme,elem_id = "main-c
|
|
219 |
|
220 |
samples.append(group_examples)
|
221 |
|
222 |
-
|
223 |
-
with gr.Tab("Sources",elem_id = "tab-citations",id = 1):
|
224 |
-
sources_textbox = gr.HTML(show_label=False, elem_id="sources-textbox")
|
225 |
-
docs_textbox = gr.State("")
|
226 |
-
|
227 |
-
# with Modal(visible = False) as config_modal:
|
228 |
with gr.Tab("Configuration",elem_id = "tab-config",id = 2):
|
229 |
|
230 |
-
gr.Markdown("Reminder:
|
231 |
|
232 |
|
233 |
-
dropdown_sources = gr.
|
234 |
-
["
|
235 |
label="Select source",
|
236 |
-
value=["
|
237 |
interactive=True,
|
238 |
)
|
239 |
|
@@ -256,6 +250,14 @@ with gr.Blocks(title="Audit Q&A", css="style.css", theme=theme,elem_id = "main-c
|
|
256 |
output_query = gr.Textbox(label="Query used for retrieval",show_label = True,elem_id = "reformulated-query",lines = 2,interactive = False)
|
257 |
output_language = gr.Textbox(label="Language",show_label = True,elem_id = "language",lines = 1,interactive = False)
|
258 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
with gr.Tab("About",elem_classes = "max-height other-tabs"):
|
260 |
with gr.Row():
|
261 |
with gr.Column(scale=1):
|
|
|
44 |
|
45 |
# Prepare default values
|
46 |
if len(sources) == 0:
|
47 |
+
sources = ["Consolidated Reports"]
|
48 |
|
49 |
if len(reports) == 0:
|
50 |
reports = []
|
|
|
219 |
|
220 |
samples.append(group_examples)
|
221 |
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
with gr.Tab("Configuration",elem_id = "tab-config",id = 2):
|
223 |
|
224 |
+
gr.Markdown("Reminder: To get better results select the specific report/reports")
|
225 |
|
226 |
|
227 |
+
dropdown_sources = gr.Dropdown(
|
228 |
+
["Consolidated Reports", "District","Ministry"],
|
229 |
label="Select source",
|
230 |
+
value=["Ministry"],
|
231 |
interactive=True,
|
232 |
)
|
233 |
|
|
|
250 |
output_query = gr.Textbox(label="Query used for retrieval",show_label = True,elem_id = "reformulated-query",lines = 2,interactive = False)
|
251 |
output_language = gr.Textbox(label="Language",show_label = True,elem_id = "language",lines = 1,interactive = False)
|
252 |
|
253 |
+
|
254 |
+
with gr.Tab("Sources",elem_id = "tab-citations",id = 1):
|
255 |
+
sources_textbox = gr.HTML(show_label=False, elem_id="sources-textbox")
|
256 |
+
docs_textbox = gr.State("")
|
257 |
+
|
258 |
+
# with Modal(visible = False) as config_modal:
|
259 |
+
|
260 |
+
|
261 |
with gr.Tab("About",elem_classes = "max-height other-tabs"):
|
262 |
with gr.Row():
|
263 |
with gr.Column(scale=1):
|