Update app.py
Browse files
app.py
CHANGED
|
@@ -109,7 +109,7 @@ conv = Conversation(prompt, 10)
|
|
| 109 |
# with gr.Blocks(css="#chatbot{height:800px} .overflow-y-auto{height:500px}") as demo:
|
| 110 |
# chatbot = gr.Chatbot([], elem_id="chatbot").style(height=750)
|
| 111 |
with gr.Blocks(css="#chatty{height:800px} .overflow-y-auto{height:500px}") as demo:
|
| 112 |
-
|
| 113 |
|
| 114 |
with gr.Row():
|
| 115 |
with gr.Column(scale=0.85):
|
|
@@ -121,10 +121,10 @@ with gr.Blocks(css="#chatty{height:800px} .overflow-y-auto{height:500px}") as de
|
|
| 121 |
btn = gr.UploadButton("📁", file_types=["image", "video", "audio"])
|
| 122 |
|
| 123 |
txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
|
| 124 |
-
bot,
|
| 125 |
)
|
| 126 |
txt_msg.then(lambda: gr.update(interactive=True), None, [txt], queue=False)
|
| 127 |
file_msg = btn.upload(add_file, [chatbot, btn], [chatbot], queue=False).then(
|
| 128 |
-
bot,
|
| 129 |
)
|
| 130 |
demo.launch()
|
|
|
|
| 109 |
# with gr.Blocks(css="#chatbot{height:800px} .overflow-y-auto{height:500px}") as demo:
|
| 110 |
# chatbot = gr.Chatbot([], elem_id="chatbot").style(height=750)
|
| 111 |
with gr.Blocks(css="#chatty{height:800px} .overflow-y-auto{height:500px}") as demo:
|
| 112 |
+
chatty = gr.Chatbot([], name="Chatty", elem_id="chatty").style(height=800, width=800)
|
| 113 |
|
| 114 |
with gr.Row():
|
| 115 |
with gr.Column(scale=0.85):
|
|
|
|
| 121 |
btn = gr.UploadButton("📁", file_types=["image", "video", "audio"])
|
| 122 |
|
| 123 |
txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
|
| 124 |
+
bot, chatty, chatty
|
| 125 |
)
|
| 126 |
txt_msg.then(lambda: gr.update(interactive=True), None, [txt], queue=False)
|
| 127 |
file_msg = btn.upload(add_file, [chatbot, btn], [chatbot], queue=False).then(
|
| 128 |
+
bot, chatty, chatty
|
| 129 |
)
|
| 130 |
demo.launch()
|