Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,6 +21,19 @@ snapshot_download(
|
|
| 21 |
local_dir = "./inference/xcodec_mini_infer"
|
| 22 |
)
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
# Change to the "inference" directory
|
| 25 |
inference_dir = "./inference"
|
| 26 |
try:
|
|
|
|
| 21 |
local_dir = "./inference/xcodec_mini_infer"
|
| 22 |
)
|
| 23 |
|
| 24 |
+
# Install required package
|
| 25 |
+
def install_flash_attn():
|
| 26 |
+
try:
|
| 27 |
+
print("Installing flash-attn...")
|
| 28 |
+
subprocess.run(
|
| 29 |
+
["pip", "install", "flash-attn", "--no-build-isolation"],
|
| 30 |
+
check=True
|
| 31 |
+
)
|
| 32 |
+
print("flash-attn installed successfully!")
|
| 33 |
+
except subprocess.CalledProcessError as e:
|
| 34 |
+
print(f"Failed to install flash-attn: {e}")
|
| 35 |
+
exit(1)
|
| 36 |
+
|
| 37 |
# Change to the "inference" directory
|
| 38 |
inference_dir = "./inference"
|
| 39 |
try:
|