Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -42,6 +42,8 @@ def list_attributes_and_values():
|
|
42 |
"""
|
43 |
return html_script
|
44 |
|
|
|
|
|
45 |
|
46 |
with gr.Blocks() as demo:
|
47 |
|
@@ -95,6 +97,7 @@ with gr.Blocks() as demo:
|
|
95 |
dd_keywords = gr.Dropdown(label="Words to look for (Optional)", multiselect=True, allow_custom_value=True, scale=5)
|
96 |
mist_button = gr.Button("Ask AI")
|
97 |
fi_checkpoint = gr.File()
|
|
|
98 |
|
99 |
with gr.Tab("Classification by topic"):
|
100 |
gr.Markdown("### This section will categories each contribution in your own personalized categories")
|
@@ -188,7 +191,8 @@ with gr.Blocks() as demo:
|
|
188 |
|
189 |
#llm
|
190 |
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,fi_checkpoint])
|
191 |
-
|
|
|
192 |
#classification
|
193 |
btn_classif.click(classification, inputs=[dd_source_class, fi_excel, df_category, sl_treshold], outputs=[fi_excel, df_output])
|
194 |
btn_reset_df.click(reset_cate, inputs=df_category, outputs=df_category)
|
|
|
42 |
"""
|
43 |
return html_script
|
44 |
|
45 |
+
def retrieve_checkpoint():
|
46 |
+
return "checkpointfile.xlsx"
|
47 |
|
48 |
with gr.Blocks() as demo:
|
49 |
|
|
|
97 |
dd_keywords = gr.Dropdown(label="Words to look for (Optional)", multiselect=True, allow_custom_value=True, scale=5)
|
98 |
mist_button = gr.Button("Ask AI")
|
99 |
fi_checkpoint = gr.File()
|
100 |
+
btn_checkpoint = gr.Button("Retrieve checkpoint file")
|
101 |
|
102 |
with gr.Tab("Classification by topic"):
|
103 |
gr.Markdown("### This section will categories each contribution in your own personalized categories")
|
|
|
191 |
|
192 |
#llm
|
193 |
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,fi_checkpoint])
|
194 |
+
btn_checkpoint.click(retrieve_checkpoint, outputs=fi_checkpoint)
|
195 |
+
|
196 |
#classification
|
197 |
btn_classif.click(classification, inputs=[dd_source_class, fi_excel, df_category, sl_treshold], outputs=[fi_excel, df_output])
|
198 |
btn_reset_df.click(reset_cate, inputs=df_category, outputs=df_category)
|