Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -62,11 +62,9 @@ class ChatBot:
|
|
| 62 |
def chat_interface(chatbot, text_query, file):
|
| 63 |
image_path = file.name if file is not None else None
|
| 64 |
response = chatbot.chat(image_path=image_path, text_query=text_query)
|
| 65 |
-
|
| 66 |
if "<box>" in response:
|
| 67 |
image_with_boxes = chatbot.draw_boxes(response)
|
| 68 |
chatbot.clear_memory()
|
| 69 |
-
# Separate the text and image responses
|
| 70 |
text_response = re.sub(r'<ref>.*?</ref>(?:<box>.*?</box>)*(?:<quad>.*?</quad>)*', '', response).strip()
|
| 71 |
return [("Qwen-VL_Chat", text_response), ("Qwen-VL_Image", image_with_boxes)]
|
| 72 |
else:
|
|
|
|
| 62 |
def chat_interface(chatbot, text_query, file):
|
| 63 |
image_path = file.name if file is not None else None
|
| 64 |
response = chatbot.chat(image_path=image_path, text_query=text_query)
|
|
|
|
| 65 |
if "<box>" in response:
|
| 66 |
image_with_boxes = chatbot.draw_boxes(response)
|
| 67 |
chatbot.clear_memory()
|
|
|
|
| 68 |
text_response = re.sub(r'<ref>.*?</ref>(?:<box>.*?</box>)*(?:<quad>.*?</quad>)*', '', response).strip()
|
| 69 |
return [("Qwen-VL_Chat", text_response), ("Qwen-VL_Image", image_with_boxes)]
|
| 70 |
else:
|