Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
815c282
1
Parent(s):
de8da04
updates
Browse files- app.py +4 -5
- requirements.txt +1 -1
app.py
CHANGED
@@ -5,16 +5,15 @@ import torch
|
|
5 |
from PIL import Image, ImageDraw
|
6 |
import gradio as gr
|
7 |
|
8 |
-
from transformers import
|
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 =
|
15 |
"ByteDance-Seed/UI-TARS-1.5-7B",
|
16 |
device_map="auto",
|
17 |
-
torch_dtype=torch.
|
18 |
)
|
19 |
processor = AutoProcessor.from_pretrained(
|
20 |
"ByteDance-Seed/UI-TARS-1.5-7B",
|
|
|
5 |
from PIL import Image, ImageDraw
|
6 |
import gradio as gr
|
7 |
|
8 |
+
from transformers import Qwen2_5_VLForConditionalGeneration
|
9 |
+
from transformers import AutoProcessor
|
|
|
10 |
from qwen_vl_utils import process_vision_info # include this file in your repo if not pip-installable
|
11 |
|
12 |
# ---- model & processor loaded on CPU ----
|
13 |
+
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
14 |
"ByteDance-Seed/UI-TARS-1.5-7B",
|
15 |
device_map="auto",
|
16 |
+
torch_dtype=torch.float32, # CPU-friendly
|
17 |
)
|
18 |
processor = AutoProcessor.from_pretrained(
|
19 |
"ByteDance-Seed/UI-TARS-1.5-7B",
|
requirements.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
transformers
|
2 |
accelerate
|
3 |
torch
|
4 |
torchvision
|
|
|
1 |
+
git+https://github.com/huggingface/transformers.git@9985d06add07a4cc691dc54a7e34f54205c04d40
|
2 |
accelerate
|
3 |
torch
|
4 |
torchvision
|