Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
#4
by
MaziyarPanahi
- opened
app.py
CHANGED
@@ -8,7 +8,7 @@ DESCRIPTION = "# [Phi-3.5-vision Demo](https://huggingface.co/microsoft/Phi-3.5-
|
|
8 |
DEVICE = "cuda"
|
9 |
|
10 |
# Load model and processor
|
11 |
-
model = AutoModelForCausalLM.from_pretrained(MODEL_NAME, trust_remote_code=True, torch_dtype="auto"
|
12 |
processor = AutoProcessor.from_pretrained(MODEL_NAME, trust_remote_code=True)
|
13 |
|
14 |
def run_example(image, text_input, model_id):
|
|
|
8 |
DEVICE = "cuda"
|
9 |
|
10 |
# Load model and processor
|
11 |
+
model = AutoModelForCausalLM.from_pretrained(MODEL_NAME, trust_remote_code=True, torch_dtype="auto").to(DEVICE).eval()
|
12 |
processor = AutoProcessor.from_pretrained(MODEL_NAME, trust_remote_code=True)
|
13 |
|
14 |
def run_example(image, text_input, model_id):
|