Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,12 @@ from PIL import Image
|
|
4 |
import os
|
5 |
import torch
|
6 |
from transformers import AutoModelForCausalLM, AutoProcessor
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
# Load the model and processor
|
9 |
model_id = "microsoft/Phi-3.5-vision-instruct"
|
|
|
4 |
import os
|
5 |
import torch
|
6 |
from transformers import AutoModelForCausalLM, AutoProcessor
|
7 |
+
import subprocess
|
8 |
+
from io import BytesIO
|
9 |
+
|
10 |
+
# Install flash-attn
|
11 |
+
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
12 |
+
|
13 |
|
14 |
# Load the model and processor
|
15 |
model_id = "microsoft/Phi-3.5-vision-instruct"
|