bdsqlsz commited on
Commit
60fb93f
1 Parent(s): e744f2e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -6,6 +6,9 @@ import os
6
  import numpy as np
7
  import spaces
8
 
 
 
 
9
  model = AutoModelForCausalLM.from_pretrained('microsoft/Florence-2-large', trust_remote_code=True).to("cuda").eval()
10
  processor = AutoProcessor.from_pretrained('microsoft/Florence-2-large', trust_remote_code=True)
11
 
 
6
  import numpy as np
7
  import spaces
8
 
9
+ import subprocess
10
+ subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
11
+
12
  model = AutoModelForCausalLM.from_pretrained('microsoft/Florence-2-large', trust_remote_code=True).to("cuda").eval()
13
  processor = AutoProcessor.from_pretrained('microsoft/Florence-2-large', trust_remote_code=True)
14