sagar007 commited on
Commit
cd12ec7
1 Parent(s): 9986a01

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
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"