Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -185,21 +185,20 @@ with gr.Blocks() as demo:
|
|
| 185 |
avatar_images=(None, (os.path.join(os.path.dirname(__file__), "avatar.png"))),
|
| 186 |
)
|
| 187 |
with gr.Row():
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
)
|
| 203 |
with gr.Row():
|
| 204 |
with gr.Column():
|
| 205 |
data = gr.Dataframe() #styler)
|
|
|
|
| 185 |
avatar_images=(None, (os.path.join(os.path.dirname(__file__), "avatar.png"))),
|
| 186 |
)
|
| 187 |
with gr.Row():
|
| 188 |
+
txt = gr.Textbox(
|
| 189 |
+
scale=4,
|
| 190 |
+
show_label=False,
|
| 191 |
+
placeholder="Enter text and press enter, or upload an image",
|
| 192 |
+
container=False,
|
| 193 |
+
)
|
| 194 |
+
btn = gr.UploadButton("📁", file_types=["image", "video", "audio"])
|
| 195 |
+
txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
|
| 196 |
+
bot, chatbot, chatbot, api_name="bot_response"
|
| 197 |
+
)
|
| 198 |
+
txt_msg.then(lambda: gr.Textbox(interactive=True), None, [txt], queue=False)
|
| 199 |
+
file_msg = btn.upload(add_file, [chatbot, btn], [chatbot], queue=False).then(
|
| 200 |
+
bot, chatbot, chatbot
|
| 201 |
+
)
|
|
|
|
| 202 |
with gr.Row():
|
| 203 |
with gr.Column():
|
| 204 |
data = gr.Dataframe() #styler)
|