Spaces:
Sleeping
Sleeping
Update qwen.py
Browse files
qwen.py
CHANGED
@@ -58,7 +58,7 @@ def qwen_chat(chat_history):
|
|
58 |
except requests.exceptions.RequestException as e:
|
59 |
print(f"Request failed: {str(e)}")
|
60 |
|
61 |
-
def get_qwen_response(
|
62 |
chat_history = [
|
63 |
{
|
64 |
"role": "system",
|
@@ -67,7 +67,7 @@ def get_qwen_response(user_message):
|
|
67 |
},
|
68 |
{
|
69 |
"role": "user",
|
70 |
-
"content":
|
71 |
}
|
72 |
]
|
73 |
return "".join(qwen_chat(chat_history))
|
|
|
58 |
except requests.exceptions.RequestException as e:
|
59 |
print(f"Request failed: {str(e)}")
|
60 |
|
61 |
+
def get_qwen_response(user_content):
|
62 |
chat_history = [
|
63 |
{
|
64 |
"role": "system",
|
|
|
67 |
},
|
68 |
{
|
69 |
"role": "user",
|
70 |
+
"content": user_content # Now accepts list of text/image elements
|
71 |
}
|
72 |
]
|
73 |
return "".join(qwen_chat(chat_history))
|