not-lain commited on
Commit
9d33c66
1 Parent(s): 11eab42

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
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 enumerate(history):
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)