Spaces:
Runtime error
Runtime error
Commit
·
4ebc48f
1
Parent(s):
51af174
update UI
Browse files
app.py
CHANGED
|
@@ -681,31 +681,32 @@ with gr.Blocks() as demo:
|
|
| 681 |
show_label = False,
|
| 682 |
)
|
| 683 |
submit_button = gr.Button("Submit")
|
| 684 |
-
|
| 685 |
|
| 686 |
-
|
| 687 |
-
|
| 688 |
-
|
| 689 |
-
|
| 690 |
-
|
| 691 |
-
|
| 692 |
-
|
| 693 |
-
|
| 694 |
-
|
| 695 |
-
|
| 696 |
-
|
| 697 |
-
|
| 698 |
-
|
| 699 |
-
|
| 700 |
-
|
| 701 |
-
|
| 702 |
-
|
| 703 |
-
|
| 704 |
-
|
| 705 |
-
|
| 706 |
-
|
| 707 |
-
|
| 708 |
# upload_button.upload(func_upload_file, [upload_button, main.chatbot], main.chatbot)
|
|
|
|
| 709 |
upload_button.upload(func_upload_file, [upload_button, chatbot], chatbot)
|
| 710 |
agentchoice.change(SetAgent, agentchoice, None)
|
| 711 |
demo.load(read_logs, None, logs, every=1)
|
|
|
|
| 681 |
show_label = False,
|
| 682 |
)
|
| 683 |
submit_button = gr.Button("Submit")
|
| 684 |
+
|
| 685 |
|
| 686 |
+
with gr.Row():
|
| 687 |
+
upload_button = gr.UploadButton("Upload To DB", file_count="multiple", scale= 0)
|
| 688 |
+
upload_file_button = gr.UploadButton("Upload File", file_count="single", scale= 0)
|
| 689 |
+
agentchoice = gr.Dropdown(
|
| 690 |
+
choices=['Zero Short Agent','Zero Short React','OpenAI Multi'],
|
| 691 |
+
label="Select Agent",
|
| 692 |
+
scale= 1,
|
| 693 |
+
show_label = False,
|
| 694 |
+
)
|
| 695 |
+
voice_input = gr.Audio(source="microphone", type="filepath", scale= 1)
|
| 696 |
+
voice_output = gr.Audio(
|
| 697 |
+
source="microphone",
|
| 698 |
+
type="filepath",
|
| 699 |
+
scale= 1,
|
| 700 |
+
interactive=False,
|
| 701 |
+
autoplay= True)
|
| 702 |
+
with gr.Accordion(
|
| 703 |
+
label = "LOGS",
|
| 704 |
+
open = False,
|
| 705 |
+
):
|
| 706 |
+
# logs = gr.Textbox()
|
| 707 |
+
logs = gr.Textbox()
|
| 708 |
# upload_button.upload(func_upload_file, [upload_button, main.chatbot], main.chatbot)
|
| 709 |
+
inputtext.submit(chathmi3, [inputtext, chatbot], [inputtext, chatbot])
|
| 710 |
upload_button.upload(func_upload_file, [upload_button, chatbot], chatbot)
|
| 711 |
agentchoice.change(SetAgent, agentchoice, None)
|
| 712 |
demo.load(read_logs, None, logs, every=1)
|