Spaces:
Runtime error
Runtime error
Commit
Β·
de8da04
1
Parent(s):
1da0f88
updates
Browse files
app.py
CHANGED
|
@@ -5,11 +5,13 @@ import torch
|
|
| 5 |
from PIL import Image, ImageDraw
|
| 6 |
import gradio as gr
|
| 7 |
|
|
|
|
|
|
|
| 8 |
from transformers import Qwen2VLForConditionalGeneration, AutoProcessor
|
| 9 |
from qwen_vl_utils import process_vision_info # include this file in your repo if not pip-installable
|
| 10 |
|
| 11 |
# ---- model & processor loaded on CPU ----
|
| 12 |
-
model =
|
| 13 |
"ByteDance-Seed/UI-TARS-1.5-7B",
|
| 14 |
device_map="auto",
|
| 15 |
torch_dtype=torch.float16, # CPU-friendly
|
|
|
|
| 5 |
from PIL import Image, ImageDraw
|
| 6 |
import gradio as gr
|
| 7 |
|
| 8 |
+
from transformers import Qwen2VLModel
|
| 9 |
+
|
| 10 |
from transformers import Qwen2VLForConditionalGeneration, AutoProcessor
|
| 11 |
from qwen_vl_utils import process_vision_info # include this file in your repo if not pip-installable
|
| 12 |
|
| 13 |
# ---- model & processor loaded on CPU ----
|
| 14 |
+
model = Qwen2VLModel.from_pretrained(
|
| 15 |
"ByteDance-Seed/UI-TARS-1.5-7B",
|
| 16 |
device_map="auto",
|
| 17 |
torch_dtype=torch.float16, # CPU-friendly
|