Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -90,9 +90,14 @@ with gr.Blocks() as demo:
|
|
90 |
with gr.Row():
|
91 |
dd_url = gr.Dropdown(label="(e.g. https://www.3gpp.org/ftp/TSG_SA/WG1_Serv/TSGS1_105_Athens/Docs)", multiselect=False, value="https://www.3gpp.org/ftp/", allow_custom_value=True, scale=9)
|
92 |
btn_search = gr.Button("Search")
|
|
|
|
|
|
|
|
|
93 |
btn_extract = gr.Button("Extract excel from URL")
|
94 |
tb_message = gr.Textbox(label="Status")
|
95 |
|
|
|
96 |
with gr.Tab("Query on columns with mistral"):
|
97 |
dd_source_ask = gr.Dropdown(label="Source Column(s)", multiselect=True)
|
98 |
tb_destcol = gr.Textbox(label="Destination column label (e.g. Summary, ELI5, PAB)")
|
@@ -135,12 +140,12 @@ with gr.Blocks() as demo:
|
|
135 |
df_output = gr.DataFrame()
|
136 |
fi_excel = gr.File(label="Excel File")
|
137 |
|
138 |
-
|
139 |
btn_search.click(browse_folder, inputs=dd_url, outputs=dd_url)
|
140 |
dd_url.change(browse_folder, inputs=dd_url, outputs=dd_url)
|
141 |
fi_excel.change(get_columns, inputs=[fi_excel], outputs=[dd_source_ask, dd_source_class, dd_label1, dd_label2, dd_searchcol, df_output])
|
142 |
|
143 |
-
btn_extract.click(extractionPrincipale, inputs=[dd_url, fi_excel], outputs=[fi_excel, tb_message])
|
144 |
|
145 |
mist_button.click(chat_with_mistral, inputs=[dd_source_ask, tb_destcol, tb_prompt, fi_excel, dd_url, dd_searchcol, dd_keywords, sl_client], outputs=[fi_excel, df_output])
|
146 |
|
|
|
90 |
with gr.Row():
|
91 |
dd_url = gr.Dropdown(label="(e.g. https://www.3gpp.org/ftp/TSG_SA/WG1_Serv/TSGS1_105_Athens/Docs)", multiselect=False, value="https://www.3gpp.org/ftp/", allow_custom_value=True, scale=9)
|
92 |
btn_search = gr.Button("Search")
|
93 |
+
with gr.Accordion("Filter by file status", open=False):
|
94 |
+
with gr.Row():
|
95 |
+
dd_status = gr.Dropdown(label="Status to look for (Optional)", allow_custom_value=True, multiselect=True, scale=7)
|
96 |
+
btn_search_status = gr.Button("Search for status", scale=2)
|
97 |
btn_extract = gr.Button("Extract excel from URL")
|
98 |
tb_message = gr.Textbox(label="Status")
|
99 |
|
100 |
+
|
101 |
with gr.Tab("Query on columns with mistral"):
|
102 |
dd_source_ask = gr.Dropdown(label="Source Column(s)", multiselect=True)
|
103 |
tb_destcol = gr.Textbox(label="Destination column label (e.g. Summary, ELI5, PAB)")
|
|
|
140 |
df_output = gr.DataFrame()
|
141 |
fi_excel = gr.File(label="Excel File")
|
142 |
|
143 |
+
btn_search_status.click(extract_statuses, inputs=dd_url, outputs=dd_status)
|
144 |
btn_search.click(browse_folder, inputs=dd_url, outputs=dd_url)
|
145 |
dd_url.change(browse_folder, inputs=dd_url, outputs=dd_url)
|
146 |
fi_excel.change(get_columns, inputs=[fi_excel], outputs=[dd_source_ask, dd_source_class, dd_label1, dd_label2, dd_searchcol, df_output])
|
147 |
|
148 |
+
btn_extract.click(extractionPrincipale, inputs=[dd_url, fi_excel, dd_status], outputs=[fi_excel, tb_message])
|
149 |
|
150 |
mist_button.click(chat_with_mistral, inputs=[dd_source_ask, tb_destcol, tb_prompt, fi_excel, dd_url, dd_searchcol, dd_keywords, sl_client], outputs=[fi_excel, df_output])
|
151 |
|