Dooratre commited on
Commit
670b69c
·
verified ·
1 Parent(s): d69813f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -85,11 +85,16 @@ def handle_message():
85
 
86
  # Build message content for Qwen
87
  user_content = []
 
 
88
  if text_content:
89
  user_content.append({"type": "text", "text": text_content})
 
 
90
  for cdn_url in image_cdn_urls:
91
  user_content.append({"type": "image", "image": cdn_url})
92
 
 
93
  if user_content:
94
  ai_response = get_qwen_response(user_content)
95
 
 
85
 
86
  # Build message content for Qwen
87
  user_content = []
88
+
89
+ # Add text content if it exists
90
  if text_content:
91
  user_content.append({"type": "text", "text": text_content})
92
+
93
+ # Add image CDN URLs
94
  for cdn_url in image_cdn_urls:
95
  user_content.append({"type": "image", "image": cdn_url})
96
 
97
+ # Send user_content to Qwen if it's not empty
98
  if user_content:
99
  ai_response = get_qwen_response(user_content)
100