suayptalha
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -14,6 +14,8 @@ def describe_image(image, user_message):
|
|
14 |
|
15 |
description = result
|
16 |
|
|
|
|
|
17 |
qwq_result = qwq_client.chat_completion(
|
18 |
messages=[{"role": "user", "content": user_message}],
|
19 |
max_tokens=512,
|
@@ -21,7 +23,7 @@ def describe_image(image, user_message):
|
|
21 |
top_p=0.95
|
22 |
)
|
23 |
|
24 |
-
return
|
25 |
|
26 |
def chat_or_image(image, user_message):
|
27 |
if image:
|
|
|
14 |
|
15 |
description = result
|
16 |
|
17 |
+
user_message = description + "\n" + user_message
|
18 |
+
|
19 |
qwq_result = qwq_client.chat_completion(
|
20 |
messages=[{"role": "user", "content": user_message}],
|
21 |
max_tokens=512,
|
|
|
23 |
top_p=0.95
|
24 |
)
|
25 |
|
26 |
+
return qwq_result['choices'][0]['message']['content']
|
27 |
|
28 |
def chat_or_image(image, user_message):
|
29 |
if image:
|