Spaces:
Runtime error
Runtime error
Commit
·
e547e36
1
Parent(s):
0663680
Add application file
Browse files
app.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from transformers import
|
| 3 |
from qwen_vl_utils import process_vision_info
|
| 4 |
import torch
|
| 5 |
|
| 6 |
# Specify the local cache path for models
|
| 7 |
-
local_path = "
|
| 8 |
|
| 9 |
# Load model and processor
|
| 10 |
-
model =
|
| 11 |
local_path, torch_dtype="auto", device_map="auto"
|
| 12 |
)
|
| 13 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
|
| 3 |
from qwen_vl_utils import process_vision_info
|
| 4 |
import torch
|
| 5 |
|
| 6 |
# Specify the local cache path for models
|
| 7 |
+
local_path = "huggingface/Qwen/Qwen2.5-VL-7B-Instruct"
|
| 8 |
|
| 9 |
# Load model and processor
|
| 10 |
+
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
| 11 |
local_path, torch_dtype="auto", device_map="auto"
|
| 12 |
)
|
| 13 |
|