Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ import re
|
|
| 10 |
import time
|
| 11 |
from threading import Thread
|
| 12 |
from io import BytesIO
|
| 13 |
-
|
| 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 |
-
#
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 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 |
|