Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,24 +32,25 @@ def main():
|
|
| 32 |
bubble_full_width=False,
|
| 33 |
scale=1,
|
| 34 |
)
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
|
|
|
| 53 |
|
| 54 |
# Start the queue and launch the interface
|
| 55 |
webApp.queue()
|
|
|
|
| 32 |
bubble_full_width=False,
|
| 33 |
scale=1,
|
| 34 |
)
|
| 35 |
+
with gr.Column(scale=8):
|
| 36 |
+
chat_input = gr.MultimodalTextbox(interactive=True,
|
| 37 |
+
#file_count="multiple",
|
| 38 |
+
placeholder="Enter message or upload file...",
|
| 39 |
+
show_label=False)
|
| 40 |
+
user_input = gr.State()
|
| 41 |
+
chat_msg = chat_input.submit(add_message, [chatbot, chat_input], [chatbot, chat_input, user_input])
|
| 42 |
+
bot_msg = chat_msg.then(bot, [chatbot, user_input], chatbot, api_name="bot_response")
|
| 43 |
+
bot_msg.then(lambda: gr.MultimodalTextbox(interactive=True), None, [chat_input])
|
| 44 |
+
chatbot.like(print_like_dislike, None, None)
|
| 45 |
+
|
| 46 |
+
with gr.Column(scale=3):
|
| 47 |
+
# Add examples
|
| 48 |
+
gr.Examples(
|
| 49 |
+
examples=examples,
|
| 50 |
+
inputs=chat_input,
|
| 51 |
+
label="Click on an example to try it"
|
| 52 |
+
)
|
| 53 |
+
|
| 54 |
|
| 55 |
# Start the queue and launch the interface
|
| 56 |
webApp.queue()
|