Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import dotenv
|
| 2 |
|
| 3 |
dotenv.load_dotenv(override=True)
|
| 4 |
|
| 5 |
import subprocess
|
| 6 |
-
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
| 7 |
|
| 8 |
import spaces
|
| 9 |
import gradio as gr
|
|
|
|
| 1 |
+
'''
|
| 2 |
+
pip install "httpx[socks]" spaces
|
| 3 |
+
pip install -r requirements.txt
|
| 4 |
+
|
| 5 |
+
flash_attn-2.7.2.post1+cu12torch2.2cxx11abiFALSE-cp311-cp311-linux_x86_64.whl
|
| 6 |
+
|
| 7 |
+
wget https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.2.post1/flash_attn-2.7.2.post1+cu12torch2.2cxx11abiFALSE-cp311-cp311-linux_x86_64.whl
|
| 8 |
+
|
| 9 |
+
pip install flash_attn-2.7.2.post1+cu12torch2.2cxx11abiFALSE-cp311-cp311-linux_x86_64.whl
|
| 10 |
+
|
| 11 |
+
python app.py --share
|
| 12 |
+
'''
|
| 13 |
+
|
| 14 |
+
|
| 15 |
import dotenv
|
| 16 |
|
| 17 |
dotenv.load_dotenv(override=True)
|
| 18 |
|
| 19 |
import subprocess
|
| 20 |
+
#subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
| 21 |
|
| 22 |
import spaces
|
| 23 |
import gradio as gr
|