Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -264,6 +264,20 @@ def demo():
|
|
264 |
clear_btn = gr.ClearButton([msg, chatbot], value="Clear conversation")
|
265 |
|
266 |
with gr.Tab("Step 6 - Chatbot without document"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
chatbot_no_doc = gr.Chatbot(height=300)
|
268 |
with gr.Row():
|
269 |
msg_no_doc = gr.Textbox(placeholder="Type message to chat with lucIAna", container=True)
|
@@ -300,27 +314,6 @@ def demo():
|
|
300 |
queue=False)
|
301 |
|
302 |
# Initialize LLM without document for conversation
|
303 |
-
with gr.Tab("Initialize LLM for Chatbot without document"):
|
304 |
-
with gr.Row():
|
305 |
-
llm_no_doc_btn = gr.Radio(list_llm_simple,
|
306 |
-
label="LLM models", value=list_llm_simple[0], type="index", info="Choose your LLM model for chatbot without document")
|
307 |
-
with gr.Accordion("Advanced options - LLM model", open=False):
|
308 |
-
with gr.Row():
|
309 |
-
slider_temperature_no_doc = gr.Slider(minimum=0.01, maximum=1.0, value=0.7, step=0.1, label="Temperature", info="Model temperature", interactive=True)
|
310 |
-
with gr.Row():
|
311 |
-
slider_maxtokens_no_doc = gr.Slider(minimum=224, maximum=4096, value=1024, step=32, label="Max Tokens", info="Model max tokens", interactive=True)
|
312 |
-
with gr.Row():
|
313 |
-
slider_topk_no_doc = gr.Slider(minimum=1, maximum=10, value=3, step=1, label="top-k samples", info="Model top-k samples", interactive=True)
|
314 |
-
with gr.Row():
|
315 |
-
llm_no_doc_progress = gr.Textbox(value="None", label="LLM initialization for chatbot without document")
|
316 |
-
with gr.Row():
|
317 |
-
llm_no_doc_init_btn = gr.Button("Initialize LLM for Chatbot without document")
|
318 |
-
with gr.Row():
|
319 |
-
msg_no_doc = gr.Textbox(placeholder="Type message to chat with lucIAna", container=True)
|
320 |
-
with gr.Row():
|
321 |
-
submit_btn_no_doc = gr.Button("Submit message")
|
322 |
-
clear_btn_no_doc = gr.ClearButton([msg_no_doc, chatbot_no_doc], value="Clear conversation")
|
323 |
-
|
324 |
llm_no_doc_init_btn.click(initialize_llm_no_doc,
|
325 |
inputs=[llm_no_doc_btn, slider_temperature_no_doc, slider_maxtokens_no_doc, slider_topk_no_doc, initial_prompt],
|
326 |
outputs=[llm_no_doc, llm_no_doc_progress])
|
|
|
264 |
clear_btn = gr.ClearButton([msg, chatbot], value="Clear conversation")
|
265 |
|
266 |
with gr.Tab("Step 6 - Chatbot without document"):
|
267 |
+
with gr.Row():
|
268 |
+
llm_no_doc_btn = gr.Radio(list_llm_simple,
|
269 |
+
label="LLM models", value=list_llm_simple[0], type="index", info="Choose your LLM model for chatbot without document")
|
270 |
+
with gr.Accordion("Advanced options - LLM model", open=False):
|
271 |
+
with gr.Row():
|
272 |
+
slider_temperature_no_doc = gr.Slider(minimum=0.01, maximum=1.0, value=0.7, step=0.1, label="Temperature", info="Model temperature", interactive=True)
|
273 |
+
with gr.Row():
|
274 |
+
slider_maxtokens_no_doc = gr.Slider(minimum=224, maximum=4096, value=1024, step=32, label="Max Tokens", info="Model max tokens", interactive=True)
|
275 |
+
with gr.Row():
|
276 |
+
slider_topk_no_doc = gr.Slider(minimum=1, maximum=10, value=3, step=1, label="top-k samples", info="Model top-k samples", interactive=True)
|
277 |
+
with gr.Row():
|
278 |
+
llm_no_doc_progress = gr.Textbox(value="None", label="LLM initialization for chatbot without document")
|
279 |
+
with gr.Row():
|
280 |
+
llm_no_doc_init_btn = gr.Button("Initialize LLM for Chatbot without document")
|
281 |
chatbot_no_doc = gr.Chatbot(height=300)
|
282 |
with gr.Row():
|
283 |
msg_no_doc = gr.Textbox(placeholder="Type message to chat with lucIAna", container=True)
|
|
|
314 |
queue=False)
|
315 |
|
316 |
# Initialize LLM without document for conversation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
317 |
llm_no_doc_init_btn.click(initialize_llm_no_doc,
|
318 |
inputs=[llm_no_doc_btn, slider_temperature_no_doc, slider_maxtokens_no_doc, slider_topk_no_doc, initial_prompt],
|
319 |
outputs=[llm_no_doc, llm_no_doc_progress])
|