Spaces:
Runtime error
Runtime error
Commit
·
990cad9
1
Parent(s):
5cea955
add new feature
Browse files
app.py
CHANGED
@@ -595,6 +595,11 @@ def SetAgent(Choice):
|
|
595 |
agent = agent_OPENAI_MULTI
|
596 |
print("Set to:", Choice)
|
597 |
|
|
|
|
|
|
|
|
|
|
|
598 |
with gr.Blocks() as demo:
|
599 |
# gr.Markdown("Start typing below and then click **SUBMIT** to see the output.")
|
600 |
main = gr.ChatInterface(
|
@@ -609,7 +614,8 @@ with gr.Blocks() as demo:
|
|
609 |
choices=['Zero Short Agent','Zero Short React','OpenAI Multi'],
|
610 |
label="Select Agent",
|
611 |
)
|
612 |
-
voice_input = gr.Audio(source="microphone", type="filepath", scale=
|
|
|
613 |
with gr.Accordion(
|
614 |
label = "LOGS",
|
615 |
open = False,
|
@@ -618,6 +624,7 @@ with gr.Blocks() as demo:
|
|
618 |
logs = gr.Textbox()
|
619 |
upload_button.upload(func_upload_file, [upload_button, main.chatbot], main.chatbot)
|
620 |
demo.load(read_logs, None, logs, every=0.5)
|
|
|
621 |
agentchoice.change(SetAgent, agentchoice, None)
|
622 |
|
623 |
|
|
|
595 |
agent = agent_OPENAI_MULTI
|
596 |
print("Set to:", Choice)
|
597 |
|
598 |
+
def LinkElement(chat_history):
|
599 |
+
print(chat_history)
|
600 |
+
print("link element test")
|
601 |
+
|
602 |
+
|
603 |
with gr.Blocks() as demo:
|
604 |
# gr.Markdown("Start typing below and then click **SUBMIT** to see the output.")
|
605 |
main = gr.ChatInterface(
|
|
|
614 |
choices=['Zero Short Agent','Zero Short React','OpenAI Multi'],
|
615 |
label="Select Agent",
|
616 |
)
|
617 |
+
voice_input = gr.Audio(source="microphone", type="filepath", scale= 0)
|
618 |
+
voice_output = gr.Audio(type="filepath", scale= 0)
|
619 |
with gr.Accordion(
|
620 |
label = "LOGS",
|
621 |
open = False,
|
|
|
624 |
logs = gr.Textbox()
|
625 |
upload_button.upload(func_upload_file, [upload_button, main.chatbot], main.chatbot)
|
626 |
demo.load(read_logs, None, logs, every=0.5)
|
627 |
+
main.chatbot.change(LinkElement, main.chatbot, None)
|
628 |
agentchoice.change(SetAgent, agentchoice, None)
|
629 |
|
630 |
|