YchKhan commited on
Commit
ef2a31f
1 Parent(s): c9d9111

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -6,6 +6,7 @@ from chart_generation import *
6
  from charts_advanced import *
7
  from users_management import *
8
  from code_df_custom import *
 
9
 
10
 
11
  # Categories
@@ -131,6 +132,9 @@ with gr.Blocks() as demo:
131
  btn_search_status = gr.Button("Search for status", scale=2)
132
  btn_extract = gr.Button("Extract excel from URL")
133
 
 
 
 
134
 
135
  with gr.Tab("Ask LLM"):
136
  gr.Markdown("### This section utilizes Large Language Models (LLMs) to query rows in an Excel file")
@@ -208,6 +212,10 @@ with gr.Blocks() as demo:
208
  fi_excel.change(get_columns, inputs=[fi_excel], outputs=[dd_source_ask, dd_source_class, dd_label1, dd_label2, dd_searchcol, df_output,st_filename, df_input])
209
 
210
  btn_extract.click(extractionPrincipale, inputs=[dd_url, fi_excel, dd_status], outputs=[fi_excel])
 
 
 
 
211
 
212
  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])
213
 
 
6
  from charts_advanced import *
7
  from users_management import *
8
  from code_df_custom import *
9
+ from split_files_to_excel import *
10
 
11
 
12
  # Categories
 
132
  btn_search_status = gr.Button("Search for status", scale=2)
133
  btn_extract = gr.Button("Extract excel from URL")
134
 
135
+ with gr.Tab("Split Files"):
136
+ fi_input = gr.File(file_count='multiple')
137
+
138
 
139
  with gr.Tab("Ask LLM"):
140
  gr.Markdown("### This section utilizes Large Language Models (LLMs) to query rows in an Excel file")
 
212
  fi_excel.change(get_columns, inputs=[fi_excel], outputs=[dd_source_ask, dd_source_class, dd_label1, dd_label2, dd_searchcol, df_output,st_filename, df_input])
213
 
214
  btn_extract.click(extractionPrincipale, inputs=[dd_url, fi_excel, dd_status], outputs=[fi_excel])
215
+
216
+
217
+ # Split files
218
+ fi_input.upload(split_in_df, inputs=fi_input, outputs=fi_excel)
219
 
220
  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])
221