Spaces:
Runtime error
Runtime error
Commit
·
4101c27
1
Parent(s):
f4e2335
update textbox ui/func
Browse files
app.py
CHANGED
@@ -628,6 +628,14 @@ def LinkElement(chatbot_history):
|
|
628 |
print("From linkelement: ", chatbot_history)
|
629 |
pass
|
630 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
631 |
|
632 |
with gr.Blocks() as demo:
|
633 |
# gr.Markdown("Start typing below and then click **SUBMIT** to see the output.")
|
@@ -638,11 +646,17 @@ with gr.Blocks() as demo:
|
|
638 |
)
|
639 |
|
640 |
with gr.Column() as main2:
|
641 |
-
title = gr.Markdown("#STLA BABY - YOUR FRIENDLY GUIDE"),
|
642 |
chatbot = gr.Chatbot()
|
643 |
with gr.Row():
|
644 |
-
inputtext = gr.Textbox(
|
|
|
|
|
|
|
|
|
|
|
645 |
submit_button = gr.Button("Submit")
|
|
|
646 |
|
647 |
with gr.Row():
|
648 |
upload_button = gr.UploadButton("Upload To DB", file_count="multiple", scale= 0)
|
|
|
628 |
print("From linkelement: ", chatbot_history)
|
629 |
pass
|
630 |
|
631 |
+
def chathmi3(message, history):
|
632 |
+
history = history + [((message,), None)]
|
633 |
+
print("Input Message:", message)
|
634 |
+
print("History: ", history)
|
635 |
+
print("-" * 20)
|
636 |
+
print("-" * 20)
|
637 |
+
yield ["", history]
|
638 |
+
|
639 |
|
640 |
with gr.Blocks() as demo:
|
641 |
# gr.Markdown("Start typing below and then click **SUBMIT** to see the output.")
|
|
|
646 |
)
|
647 |
|
648 |
with gr.Column() as main2:
|
649 |
+
title = gr.Markdown("# STLA BABY - YOUR FRIENDLY GUIDE"),
|
650 |
chatbot = gr.Chatbot()
|
651 |
with gr.Row():
|
652 |
+
inputtext = gr.Textbox(
|
653 |
+
scale= 4,
|
654 |
+
label="",
|
655 |
+
placeholder = "Input Your Question",
|
656 |
+
show_label = False,
|
657 |
+
)
|
658 |
submit_button = gr.Button("Submit")
|
659 |
+
inputtext.submit(chathmi3, [inputtext, chatbot], [inputtext, chatbot])
|
660 |
|
661 |
with gr.Row():
|
662 |
upload_button = gr.UploadButton("Upload To DB", file_count="multiple", scale= 0)
|