Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -194,7 +194,7 @@ with gr.Blocks() as ux:
|
|
| 194 |
gr.HTML("""<center><div style='font-size:xx-large;font-weight:900;'>Chatbo</div>""")
|
| 195 |
chatbot=gr.Chatbot(type='messages',show_label=False, show_share_button=False, show_copy_button=True, layout="panel")
|
| 196 |
prompt=gr.MultimodalTextbox(label="Prompt",file_count="multiple", file_types=["image"])
|
| 197 |
-
|
| 198 |
mod_c=gr.Dropdown(choices=[n['name'] for n in clients],value='Qwen/Qwen2.5-Coder-32B-Instruct',type='index')
|
| 199 |
|
| 200 |
with gr.Row():
|
|
@@ -207,8 +207,8 @@ with gr.Blocks() as ux:
|
|
| 207 |
file_name=gr.Textbox(label="File Name")
|
| 208 |
file_btn=gr.Button("Load Files")
|
| 209 |
file_json=gr.JSON()
|
| 210 |
-
sub_b = submit_b.click(agent, [
|
| 211 |
-
sub_p = prompt.submit(agent, [
|
| 212 |
stop_b.click(None,None,None, cancels=[sub_b,sub_p])
|
| 213 |
ux.queue(default_concurrency_limit=20).launch(max_threads=40)
|
| 214 |
|
|
|
|
| 194 |
gr.HTML("""<center><div style='font-size:xx-large;font-weight:900;'>Chatbo</div>""")
|
| 195 |
chatbot=gr.Chatbot(type='messages',show_label=False, show_share_button=False, show_copy_button=True, layout="panel")
|
| 196 |
prompt=gr.MultimodalTextbox(label="Prompt",file_count="multiple", file_types=["image"])
|
| 197 |
+
chat_ux=gr.ChatInterface(chatbot=chatbot,textbox=prompt)
|
| 198 |
mod_c=gr.Dropdown(choices=[n['name'] for n in clients],value='Qwen/Qwen2.5-Coder-32B-Instruct',type='index')
|
| 199 |
|
| 200 |
with gr.Row():
|
|
|
|
| 207 |
file_name=gr.Textbox(label="File Name")
|
| 208 |
file_btn=gr.Button("Load Files")
|
| 209 |
file_json=gr.JSON()
|
| 210 |
+
sub_b = submit_b.click(agent, [chatbot,mod_c],chatbot)
|
| 211 |
+
sub_p = prompt.submit(agent, [chatbot,mod_c],chatbot)
|
| 212 |
stop_b.click(None,None,None, cancels=[sub_b,sub_p])
|
| 213 |
ux.queue(default_concurrency_limit=20).launch(max_threads=40)
|
| 214 |
|