Martin Bär
commited on
Commit
·
ef24142
1
Parent(s):
24062eb
Change Qwen back to 32B
Browse files- multimodality_tools.py +5 -2
multimodality_tools.py
CHANGED
@@ -69,7 +69,7 @@ def answer_image_question(question: str, file_id: str) -> str:
|
|
69 |
)
|
70 |
|
71 |
completion = client.chat.completions.create(
|
72 |
-
model= "Qwen/Qwen2.5-VL-
|
73 |
messages=[
|
74 |
{
|
75 |
"role": "user",
|
@@ -151,8 +151,11 @@ def get_video_tool():
|
|
151 |
description="Watch a video and get a content description as a string."
|
152 |
)
|
153 |
|
|
|
|
|
|
|
154 |
def _get_file(task_id: str) -> io.BytesIO:
|
155 |
-
res = requests.get(
|
156 |
if res.status_code != 200:
|
157 |
raise FileNotFoundError("Invalid file or task id.")
|
158 |
file_like = io.BytesIO(res.content)
|
|
|
69 |
)
|
70 |
|
71 |
completion = client.chat.completions.create(
|
72 |
+
model= "Qwen/Qwen2.5-VL-32B-Instruct",
|
73 |
messages=[
|
74 |
{
|
75 |
"role": "user",
|
|
|
151 |
description="Watch a video and get a content description as a string."
|
152 |
)
|
153 |
|
154 |
+
def _build_file_url(task_id: str) -> str:
|
155 |
+
return DEFAULT_API_URL + f"/files/{task_id}"
|
156 |
+
|
157 |
def _get_file(task_id: str) -> io.BytesIO:
|
158 |
+
res = requests.get(_build_file_url(task_id))
|
159 |
if res.status_code != 200:
|
160 |
raise FileNotFoundError("Invalid file or task id.")
|
161 |
file_like = io.BytesIO(res.content)
|