heymenn commited on
Commit
2a26969
1 Parent(s): 008a26a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -13
app.py CHANGED
@@ -12,7 +12,8 @@ from chart_generation import *
12
  from charts_advanced import *
13
  from users_management import *
14
  from code_df_custom import *
15
- ## BUGS = from split_files_to_excel import *
 
16
 
17
 
18
  # Categories
@@ -191,14 +192,14 @@ with gr.Blocks() as demo:
191
  btn_search_status = gr.Button("Search for status", scale=2)
192
  btn_extract = gr.Button("Extract excel from URL")
193
 
194
- # with gr.Tab("Split Files"):
195
- # gr.Markdown("### Upload your standard documentation (pdf, doc, docx) to split it into paragraphs in an Excel file")
196
- # radio = gr.Radio(
197
- # ["Intelligent split", "Intelligent split by keywords"], label="Choose your selection", value = "Intelligent split"
198
- # )
199
- # dropdown_split = gr.Dropdown(["introduction", "objective", "conclusion", "summary"], multiselect=True, visible=False, allow_custom_value=True, label="Select or add keywords")
200
- #
201
- # fi_input = gr.File(file_count='multiple')
202
 
203
  with gr.Tab("Ask LLM"):
204
  gr.Markdown("### This section utilizes Large Language Models (LLMs) to query rows in an Excel file")
@@ -284,10 +285,10 @@ with gr.Blocks() as demo:
284
  btn_extract.click(extractionPrincipale, inputs=[dd_url, fi_excel, dd_status], outputs=[fi_excel])
285
 
286
 
287
- # # Split files
288
- # #fi_input.upload(split_in_df, inputs=fi_input, outputs=fi_excel)
289
- # fi_input.upload(functionCall, inputs=[fi_input, dropdown_split, radio], outputs=fi_excel)
290
- # radio.change(fn=change_textbox, inputs=[dropdown_split,radio], outputs=dropdown_split)
291
 
292
  #llm
293
  mist_button.click(chat_with_mistral, inputs=[dd_source_ask, tb_destcol, dd_prompt, fi_excel, dd_url, dd_searchcol, dd_keywords, dd_llm, st_user], outputs=[fi_excel, df_output, dd_prompt, dd_keywords, st_user, fi_config])
 
12
  from charts_advanced import *
13
  from users_management import *
14
  from code_df_custom import *
15
+ ## BUGS =
16
+ from split_files_to_excel import *
17
 
18
 
19
  # Categories
 
192
  btn_search_status = gr.Button("Search for status", scale=2)
193
  btn_extract = gr.Button("Extract excel from URL")
194
 
195
+ with gr.Tab("Split Files"):
196
+ gr.Markdown("### Upload your standard documentation (pdf, doc, docx) to split it into paragraphs in an Excel file")
197
+ radio = gr.Radio(
198
+ ["Intelligent split", "Intelligent split by keywords"], label="Choose your selection", value = "Intelligent split"
199
+ )
200
+ dropdown_split = gr.Dropdown(["introduction", "objective", "conclusion", "summary"], multiselect=True, visible=False, allow_custom_value=True, label="Select or add keywords")
201
+
202
+ fi_input = gr.File(file_count='multiple')
203
 
204
  with gr.Tab("Ask LLM"):
205
  gr.Markdown("### This section utilizes Large Language Models (LLMs) to query rows in an Excel file")
 
285
  btn_extract.click(extractionPrincipale, inputs=[dd_url, fi_excel, dd_status], outputs=[fi_excel])
286
 
287
 
288
+ # Split files
289
+ #fi_input.upload(split_in_df, inputs=fi_input, outputs=fi_excel)
290
+ fi_input.upload(functionCall, inputs=[fi_input, dropdown_split, radio], outputs=fi_excel)
291
+ radio.change(fn=change_textbox, inputs=[dropdown_split,radio], outputs=dropdown_split)
292
 
293
  #llm
294
  mist_button.click(chat_with_mistral, inputs=[dd_source_ask, tb_destcol, dd_prompt, fi_excel, dd_url, dd_searchcol, dd_keywords, dd_llm, st_user], outputs=[fi_excel, df_output, dd_prompt, dd_keywords, st_user, fi_config])