MaksG commited on
Commit
2011f34
1 Parent(s): 4011ea8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -102,11 +102,11 @@ with gr.Blocks() as demo:
102
  dd_source_ask = gr.Dropdown(label="Source Column(s)", multiselect=True)
103
  tb_destcol = gr.Textbox(label="Destination column label (e.g. Summary, ELI5, PAB)")
104
  tb_prompt = gr.Textbox(label="Prompt")
 
105
  with gr.Accordion("Filters", open=False):
106
  with gr.Row():
107
  dd_searchcol = gr.Dropdown(label="Column to look into (Optional)", multiselect=False, scale=4)
108
  dd_keywords = gr.Dropdown(label="Words to look for (Optional)", multiselect=True, allow_custom_value=True, scale=5)
109
- sl_client = gr.Slider(label="Mistral API", maximum=1, step=1, interactive=True, scale=1)
110
  mist_button = gr.Button("Ask AI")
111
 
112
  with gr.Tab("Classification by topic"):
@@ -147,7 +147,7 @@ with gr.Blocks() as demo:
147
 
148
  btn_extract.click(extractionPrincipale, inputs=[dd_url, fi_excel, dd_status], outputs=[fi_excel, tb_message])
149
 
150
- mist_button.click(chat_with_mistral, inputs=[dd_source_ask, tb_destcol, tb_prompt, fi_excel, dd_url, dd_searchcol, dd_keywords, sl_client], outputs=[fi_excel, df_output])
151
 
152
  btn_classif.click(classification, inputs=[dd_source_class, fi_excel, df_category], outputs=[fi_excel, df_output])
153
 
 
102
  dd_source_ask = gr.Dropdown(label="Source Column(s)", multiselect=True)
103
  tb_destcol = gr.Textbox(label="Destination column label (e.g. Summary, ELI5, PAB)")
104
  tb_prompt = gr.Textbox(label="Prompt")
105
+ rd_llm = gr.Radio(["Mistral", "Claude", "Groq"], label="Choose your LLM")
106
  with gr.Accordion("Filters", open=False):
107
  with gr.Row():
108
  dd_searchcol = gr.Dropdown(label="Column to look into (Optional)", multiselect=False, scale=4)
109
  dd_keywords = gr.Dropdown(label="Words to look for (Optional)", multiselect=True, allow_custom_value=True, scale=5)
 
110
  mist_button = gr.Button("Ask AI")
111
 
112
  with gr.Tab("Classification by topic"):
 
147
 
148
  btn_extract.click(extractionPrincipale, inputs=[dd_url, fi_excel, dd_status], outputs=[fi_excel, tb_message])
149
 
150
+ mist_button.click(chat_with_mistral, inputs=[dd_source_ask, tb_destcol, tb_prompt, fi_excel, dd_url, dd_searchcol, dd_keywords, rd_llm], outputs=[fi_excel, df_output])
151
 
152
  btn_classif.click(classification, inputs=[dd_source_class, fi_excel, df_category], outputs=[fi_excel, df_output])
153