Spaces:
Running
on
Zero
Running
on
Zero
MaziyarPanahi
commited on
Commit
•
153a98d
1
Parent(s):
8f558df
Update app.py (#4)
Browse files- Update app.py (a92c2dcb0588e180ab24862e807d7d34a760b59a)
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):
|