Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,15 +12,17 @@ import os
|
|
| 12 |
from pydub import AudioSegment
|
| 13 |
import noisereduce as nr
|
| 14 |
|
| 15 |
-
import
|
| 16 |
import subprocess
|
| 17 |
|
| 18 |
-
# Ensure librosa is installed
|
| 19 |
try:
|
| 20 |
import librosa
|
|
|
|
| 21 |
except ImportError:
|
|
|
|
| 22 |
subprocess.run(["pip", "install", "librosa"])
|
| 23 |
import librosa
|
|
|
|
| 24 |
|
| 25 |
|
| 26 |
|
|
|
|
| 12 |
from pydub import AudioSegment
|
| 13 |
import noisereduce as nr
|
| 14 |
|
| 15 |
+
import streamlit as st
|
| 16 |
import subprocess
|
| 17 |
|
|
|
|
| 18 |
try:
|
| 19 |
import librosa
|
| 20 |
+
st.write("✅ Librosa is installed successfully!")
|
| 21 |
except ImportError:
|
| 22 |
+
st.write("❌ Librosa is missing! Installing now...")
|
| 23 |
subprocess.run(["pip", "install", "librosa"])
|
| 24 |
import librosa
|
| 25 |
+
st.write("✅ Librosa installed successfully!")
|
| 26 |
|
| 27 |
|
| 28 |
|