Spaces:
Runtime error
Runtime error
Commit
·
250dec4
1
Parent(s):
73cf8c1
new UI test
Browse files
app.py
CHANGED
@@ -662,12 +662,12 @@ def chathmi3(message, history):
|
|
662 |
|
663 |
with gr.Blocks() as demo:
|
664 |
# gr.Markdown("Start typing below and then click **SUBMIT** to see the output.")
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
|
672 |
with gr.Column() as main2:
|
673 |
title = gr.Markdown("""# <center> STLA BABY - YOUR FRIENDLY GUIDE
|
@@ -680,7 +680,7 @@ with gr.Blocks() as demo:
|
|
680 |
placeholder = "Input Your Question",
|
681 |
show_label = False,
|
682 |
)
|
683 |
-
|
684 |
|
685 |
|
686 |
with gr.Row():
|
@@ -706,9 +706,10 @@ with gr.Blocks() as demo:
|
|
706 |
):
|
707 |
# logs = gr.Textbox()
|
708 |
frash_logs = gr.Button("Update Logs ...")
|
709 |
-
logs = gr.Textbox()
|
710 |
# upload_button.upload(func_upload_file, [upload_button, main.chatbot], main.chatbot)
|
711 |
-
inputtext.submit(chathmi3, [inputtext, chatbot], [inputtext, chatbot])
|
|
|
712 |
upload_button.upload(func_upload_file, [upload_button, chatbot], chatbot)
|
713 |
agentchoice.change(SetAgent, agentchoice, None)
|
714 |
frash_logs.click(read_logs, None, logs)
|
|
|
662 |
|
663 |
with gr.Blocks() as demo:
|
664 |
# gr.Markdown("Start typing below and then click **SUBMIT** to see the output.")
|
665 |
+
main = gr.ChatInterface(
|
666 |
+
None,
|
667 |
+
title="STLA BABY - YOUR FRIENDLY GUIDE",
|
668 |
+
description= "v0.3: Powered by MECH Core Team",
|
669 |
+
)
|
670 |
+
main.textbox.submit(chathmi3, [main.textbox, main.chatbot], [main.textbox, main.chatbot])
|
671 |
|
672 |
with gr.Column() as main2:
|
673 |
title = gr.Markdown("""# <center> STLA BABY - YOUR FRIENDLY GUIDE
|
|
|
680 |
placeholder = "Input Your Question",
|
681 |
show_label = False,
|
682 |
)
|
683 |
+
stop_button = gr.Button("STOP", variant='stop')
|
684 |
|
685 |
|
686 |
with gr.Row():
|
|
|
706 |
):
|
707 |
# logs = gr.Textbox()
|
708 |
frash_logs = gr.Button("Update Logs ...")
|
709 |
+
logs = gr.Textbox(max_lines = 25)
|
710 |
# upload_button.upload(func_upload_file, [upload_button, main.chatbot], main.chatbot)
|
711 |
+
inf1 = inputtext.submit(chathmi3, [inputtext, chatbot], [inputtext, chatbot])
|
712 |
+
stop_button.click(read_logs, None, logs, cancels=[inf1])
|
713 |
upload_button.upload(func_upload_file, [upload_button, chatbot], chatbot)
|
714 |
agentchoice.change(SetAgent, agentchoice, None)
|
715 |
frash_logs.click(read_logs, None, logs)
|