Spaces:
Runtime error
Runtime error
Upload 4 files
Browse files- app.py +4 -4
- requirements.txt +3 -0
- setup.sh +11 -0
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
|
2 |
-
subprocess
|
3 |
-
subprocess.run('
|
4 |
-
subprocess.run('
|
5 |
|
6 |
import fn
|
7 |
import gradio as gr
|
|
|
1 |
+
if __name__ == "__main__":
|
2 |
+
import subprocess
|
3 |
+
subprocess.run('bash setup.sh', shell=True)
|
4 |
+
subprocess.run('bash venv.sh', shell=True)
|
5 |
|
6 |
import fn
|
7 |
import gradio as gr
|
requirements.txt
CHANGED
@@ -19,3 +19,6 @@ accelerate==0.33.0
|
|
19 |
peft==0.12.0
|
20 |
wheel
|
21 |
python-multipart
|
|
|
|
|
|
|
|
19 |
peft==0.12.0
|
20 |
wheel
|
21 |
python-multipart
|
22 |
+
-r requirements-torch.txt
|
23 |
+
-r requirements-fa.txt
|
24 |
+
unsloth[cu121-ampere-torch230] @ git+https://github.com/unslothai/unsloth.git"
|
setup.sh
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/bash
|
2 |
+
|
3 |
+
sudo apt install python3.10-dev
|
4 |
+
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-keyring_1.0-1_all.deb
|
5 |
+
sudo dpkg -i cuda-keyring_1.0-1_all.deb
|
6 |
+
sudo apt update
|
7 |
+
sudo apt-get install cuda-toolkit-12-1
|
8 |
+
echo 'if [ -e /usr/local/cuda ]; then' >> ~/.bashrc
|
9 |
+
echo 'export PATH="/usr/local/cuda/bin:$PATH"' >> ~/.bashrc
|
10 |
+
echo 'export LD_LIBRARY_PATH="/usr/local/cuda/lib64:$LD_LIBRARY_PATH"' >> ~/.bashrc
|
11 |
+
echo 'fi' >> ~/.bashrc
|