Spaces:
Build error
Build error
Create setup_dependencies.py
Browse files- setup_dependencies.py +19 -0
setup_dependencies.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import subprocess
|
| 2 |
+
|
| 3 |
+
def install_dependencies():
|
| 4 |
+
dependencies = [
|
| 5 |
+
"packaging",
|
| 6 |
+
"setuptools",
|
| 7 |
+
"flash-attn",
|
| 8 |
+
"transformers==4.32.0",
|
| 9 |
+
"safetensors",
|
| 10 |
+
"tiktoken",
|
| 11 |
+
"flask",
|
| 12 |
+
"torch",
|
| 13 |
+
"gunicorn==20.1.0"
|
| 14 |
+
]
|
| 15 |
+
|
| 16 |
+
for package in dependencies:
|
| 17 |
+
subprocess.run([sys.executable, "-m", "pip", "install", "--no-cache-dir", "--upgrade", package])
|
| 18 |
+
|
| 19 |
+
install_dependencies()
|