Spaces:
Sleeping
Sleeping
Commit
·
8230329
1
Parent(s):
57c4bbb
thr
Browse files
app.py
CHANGED
|
@@ -38,6 +38,7 @@ def model_inference(
|
|
| 38 |
# print(images)
|
| 39 |
# print(type(images))
|
| 40 |
images = [{"type": "image", "image": Image.open(image[0])} for image in images]
|
|
|
|
| 41 |
print(images)
|
| 42 |
# model = Qwen2VLForConditionalGeneration.from_pretrained(
|
| 43 |
# "Qwen/Qwen2-VL-7B-Instruct", torch_dtype="auto", device_map="auto"
|
|
@@ -57,7 +58,7 @@ def model_inference(
|
|
| 57 |
messages = [
|
| 58 |
{
|
| 59 |
"role": "user",
|
| 60 |
-
"content": images
|
| 61 |
}
|
| 62 |
]
|
| 63 |
|
|
|
|
| 38 |
# print(images)
|
| 39 |
# print(type(images))
|
| 40 |
images = [{"type": "image", "image": Image.open(image[0])} for image in images]
|
| 41 |
+
images.append({"type": "text", "text": text})
|
| 42 |
print(images)
|
| 43 |
# model = Qwen2VLForConditionalGeneration.from_pretrained(
|
| 44 |
# "Qwen/Qwen2-VL-7B-Instruct", torch_dtype="auto", device_map="auto"
|
|
|
|
| 58 |
messages = [
|
| 59 |
{
|
| 60 |
"role": "user",
|
| 61 |
+
"content": images,
|
| 62 |
}
|
| 63 |
]
|
| 64 |
|