Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,12 +10,12 @@ from pydub import AudioSegment
|
|
| 10 |
|
| 11 |
# Clone and install faster-whisper from GitHub
|
| 12 |
# (we should be able to do this in build.sh in a hf space)
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
|
| 20 |
# Add the faster-whisper directory to the Python path
|
| 21 |
sys.path.append("./faster-whisper")
|
|
|
|
| 10 |
|
| 11 |
# Clone and install faster-whisper from GitHub
|
| 12 |
# (we should be able to do this in build.sh in a hf space)
|
| 13 |
+
try:
|
| 14 |
+
subprocess.run(["git", "clone", "https://github.com/SYSTRAN/faster-whisper.git"], check=True)
|
| 15 |
+
subprocess.run(["pip", "install", "-e", "./faster-whisper"], check=True)
|
| 16 |
+
except subprocess.CalledProcessError as e:
|
| 17 |
+
print(f"Error during faster-whisper installation: {e}")
|
| 18 |
+
sys.exit(1)
|
| 19 |
|
| 20 |
# Add the faster-whisper directory to the Python path
|
| 21 |
sys.path.append("./faster-whisper")
|