Spaces:
Running
on
Zero
Running
on
Zero
wjm55
commited on
Commit
·
5674d41
1
Parent(s):
36b14dc
fixed text input
Browse files
app.py
CHANGED
|
@@ -53,6 +53,7 @@ prompt_suffix = "<|end|>\n"
|
|
| 53 |
|
| 54 |
@spaces.GPU
|
| 55 |
def run_example(image, model_id="Qwen/Qwen2-VL-7B-Instruct"):
|
|
|
|
| 56 |
image_path = array_to_image_path(image)
|
| 57 |
|
| 58 |
print(image_path)
|
|
@@ -69,7 +70,7 @@ def run_example(image, model_id="Qwen/Qwen2-VL-7B-Instruct"):
|
|
| 69 |
"type": "image",
|
| 70 |
"image": image_path,
|
| 71 |
},
|
| 72 |
-
{"type": "text", "text":
|
| 73 |
],
|
| 74 |
}
|
| 75 |
]
|
|
|
|
| 53 |
|
| 54 |
@spaces.GPU
|
| 55 |
def run_example(image, model_id="Qwen/Qwen2-VL-7B-Instruct"):
|
| 56 |
+
text_input = "Convert the image to text."
|
| 57 |
image_path = array_to_image_path(image)
|
| 58 |
|
| 59 |
print(image_path)
|
|
|
|
| 70 |
"type": "image",
|
| 71 |
"image": image_path,
|
| 72 |
},
|
| 73 |
+
{"type": "text", "text": text_input},
|
| 74 |
],
|
| 75 |
}
|
| 76 |
]
|