Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -108,14 +108,13 @@ with gr.Blocks() as demo:
|
|
108 |
dd_status = gr.Dropdown(label="Status to look for (Optional)", allow_custom_value=True, multiselect=True, scale=7)
|
109 |
btn_search_status = gr.Button("Search for status", scale=2)
|
110 |
btn_extract = gr.Button("Extract excel from URL")
|
111 |
-
tb_message = gr.Textbox(label="Status")
|
112 |
|
113 |
|
114 |
with gr.Tab("Query on columns with mistral"):
|
115 |
dd_source_ask = gr.Dropdown(label="Source Column(s)", multiselect=True)
|
116 |
tb_destcol = gr.Textbox(label="Destination column label (e.g. Summary, ELI5, PAB)")
|
117 |
dd_prompt = gr.Dropdown(label="Prompt", allow_custom_value=True, multiselect=True, max_choices=1)
|
118 |
-
|
119 |
with gr.Accordion("Filters", open=False):
|
120 |
with gr.Row():
|
121 |
dd_searchcol = gr.Dropdown(label="Column to look into (Optional)", multiselect=False, scale=4)
|
@@ -128,14 +127,14 @@ with gr.Blocks() as demo:
|
|
128 |
df_category = gr.DataFrame(label='categories', value=df_cate, interactive=True)
|
129 |
btn_classif = gr.Button("Categorize")
|
130 |
|
131 |
-
with gr.Tab("Charts Generation"):
|
132 |
with gr.Row():
|
133 |
dd_label1 = gr.Dropdown(label="Label 1", multiselect=False)
|
134 |
dd_label2 = gr.Dropdown(label="Label 2", value="", multiselect=False)
|
135 |
btn_chart = gr.Button("Generate Bar Plot")
|
136 |
plt_figure = gr.Plot()
|
137 |
|
138 |
-
with gr.Tab("
|
139 |
#gr.Markdown("## 🚧 Actuellement en maintenance 🚧")
|
140 |
with gr.Tab("Overall"):
|
141 |
btn_overall = gr.Button("Overall Review")
|
@@ -165,9 +164,9 @@ with gr.Blocks() as demo:
|
|
165 |
#fi_excel.change(get_expert,inputs=fi_excel, outputs=dd_exp)
|
166 |
fi_excel.change(get_columns, inputs=[fi_excel], outputs=[dd_source_ask, dd_source_class, dd_label1, dd_label2, dd_searchcol, df_output])
|
167 |
|
168 |
-
btn_extract.click(extractionPrincipale, inputs=[dd_url, fi_excel, dd_status], outputs=[fi_excel
|
169 |
|
170 |
-
mist_button.click(chat_with_mistral, inputs=[dd_source_ask, tb_destcol, dd_prompt, fi_excel, dd_url, dd_searchcol, dd_keywords,
|
171 |
|
172 |
btn_classif.click(classification, inputs=[dd_source_class, fi_excel, df_category], outputs=[fi_excel, df_output])
|
173 |
|
|
|
108 |
dd_status = gr.Dropdown(label="Status to look for (Optional)", allow_custom_value=True, multiselect=True, scale=7)
|
109 |
btn_search_status = gr.Button("Search for status", scale=2)
|
110 |
btn_extract = gr.Button("Extract excel from URL")
|
|
|
111 |
|
112 |
|
113 |
with gr.Tab("Query on columns with mistral"):
|
114 |
dd_source_ask = gr.Dropdown(label="Source Column(s)", multiselect=True)
|
115 |
tb_destcol = gr.Textbox(label="Destination column label (e.g. Summary, ELI5, PAB)")
|
116 |
dd_prompt = gr.Dropdown(label="Prompt", allow_custom_value=True, multiselect=True, max_choices=1)
|
117 |
+
dd_llm = gr.Dropdown(["Mistral Tiny","Mistral Small","Mistral Medium", "Claude Sonnet", "Claude Opus", "Groq"], label="Choose your LLM")
|
118 |
with gr.Accordion("Filters", open=False):
|
119 |
with gr.Row():
|
120 |
dd_searchcol = gr.Dropdown(label="Column to look into (Optional)", multiselect=False, scale=4)
|
|
|
127 |
df_category = gr.DataFrame(label='categories', value=df_cate, interactive=True)
|
128 |
btn_classif = gr.Button("Categorize")
|
129 |
|
130 |
+
with gr.Tab(" Personalised Charts Generation"):
|
131 |
with gr.Row():
|
132 |
dd_label1 = gr.Dropdown(label="Label 1", multiselect=False)
|
133 |
dd_label2 = gr.Dropdown(label="Label 2", value="", multiselect=False)
|
134 |
btn_chart = gr.Button("Generate Bar Plot")
|
135 |
plt_figure = gr.Plot()
|
136 |
|
137 |
+
with gr.Tab("Meeting Report (charts)"):
|
138 |
#gr.Markdown("## 🚧 Actuellement en maintenance 🚧")
|
139 |
with gr.Tab("Overall"):
|
140 |
btn_overall = gr.Button("Overall Review")
|
|
|
164 |
#fi_excel.change(get_expert,inputs=fi_excel, outputs=dd_exp)
|
165 |
fi_excel.change(get_columns, inputs=[fi_excel], outputs=[dd_source_ask, dd_source_class, dd_label1, dd_label2, dd_searchcol, df_output])
|
166 |
|
167 |
+
btn_extract.click(extractionPrincipale, inputs=[dd_url, fi_excel, dd_status], outputs=[fi_excel])
|
168 |
|
169 |
+
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]) #todo "
|
170 |
|
171 |
btn_classif.click(classification, inputs=[dd_source_class, fi_excel, df_category], outputs=[fi_excel, df_output])
|
172 |
|