prithivMLmods commited on
Commit
32900dd
·
verified ·
1 Parent(s): 406a8a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -10,7 +10,7 @@ import re
10
  import time
11
  from threading import Thread
12
  from io import BytesIO
13
- #import subprocess
14
  import uuid
15
  import tempfile
16
 
@@ -33,12 +33,12 @@ from gradio.themes import Soft
33
  from gradio.themes.utils import colors, fonts, sizes
34
 
35
 
36
- # Attempt to install flash-attn
37
- #try:
38
- # subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, check=True, shell=True)
39
- #except subprocess.CalledProcessError as e:
40
- # print(f"Error installing flash-attn: {e}")
41
- # print("Continuing without flash-attn.")
42
 
43
 
44
 
 
10
  import time
11
  from threading import Thread
12
  from io import BytesIO
13
+ import subprocess
14
  import uuid
15
  import tempfile
16
 
 
33
  from gradio.themes.utils import colors, fonts, sizes
34
 
35
 
36
+ #Attempt to install flash-attn
37
+ try:
38
+ subprocess.run('pip install flash_attn==2.3.4 --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, check=True, shell=True)
39
+ except subprocess.CalledProcessError as e:
40
+ print(f"Error installing flash-attn: {e}")
41
+ print("Continuing without flash-attn.")
42
 
43
 
44