heymenn commited on
Commit
a1f97d1
1 Parent(s): 77a4de5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -12
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,15 +192,15 @@ 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
- ## BUGS
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")
@@ -287,8 +288,8 @@ with gr.Blocks() as demo:
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])
 
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
+
196
+ with gr.Tab("Split Files"):
197
+ gr.Markdown("### Upload your standard documentation (pdf, doc, docx) to split it into paragraphs in an Excel file")
198
+ radio = gr.Radio(
199
+ ["Intelligent split", "Intelligent split by keywords"], label="Choose your selection", value = "Intelligent split"
200
+ )
201
+ dropdown_split = gr.Dropdown(["introduction", "objective", "conclusion", "summary"], multiselect=True, visible=False, allow_custom_value=True, label="Select or add keywords")
202
+
203
+ fi_input = gr.File(file_count='multiple')
204
 
205
  with gr.Tab("Ask LLM"):
206
  gr.Markdown("### This section utilizes Large Language Models (LLMs) to query rows in an Excel file")
 
288
 
289
  # Split files
290
  #fi_input.upload(split_in_df, inputs=fi_input, outputs=fi_excel)
291
+ fi_input.upload(functionCall, inputs=[fi_input, dropdown_split, radio], outputs=fi_excel)
292
+ radio.change(fn=change_textbox, inputs=[dropdown_split,radio], outputs=dropdown_split)
293
 
294
  #llm
295
  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])