Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def ovis_chat(message, history):
|
|
32 |
conversations = []
|
33 |
response = ""
|
34 |
text_input = message["text"]
|
35 |
-
for msg in
|
36 |
if msg["role"] == "user" and "size" not in msg.keys():
|
37 |
conversations.append({
|
38 |
"from": "human",
|
@@ -129,5 +129,9 @@ latex_delimiters_set = [{
|
|
129 |
"display": True
|
130 |
}]
|
131 |
|
|
|
|
|
|
|
|
|
132 |
demo = gr.ChatInterface(fn=ovis_chat, type="messages", textbox=gr.MultimodalTextbox(),multimodal=True)
|
133 |
demo.launch(debug=True)
|
|
|
32 |
conversations = []
|
33 |
response = ""
|
34 |
text_input = message["text"]
|
35 |
+
for msg in history:
|
36 |
if msg["role"] == "user" and "size" not in msg.keys():
|
37 |
conversations.append({
|
38 |
"from": "human",
|
|
|
129 |
"display": True
|
130 |
}]
|
131 |
|
132 |
+
# send_click_event = send_btn.click(submit_chat, [chatbot, text_input], [chatbot, text_input]).then(ovis_chat,[chatbot, image_input],chatbot)
|
133 |
+
# submit_event = text_input.submit(submit_chat, [chatbot, text_input], [chatbot, text_input]).then(ovis_chat,[chatbot, image_input],chatbot)
|
134 |
+
# clear_btn.click(clear_chat, outputs=[chatbot, image_input, text_input])
|
135 |
+
|
136 |
demo = gr.ChatInterface(fn=ovis_chat, type="messages", textbox=gr.MultimodalTextbox(),multimodal=True)
|
137 |
demo.launch(debug=True)
|