Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,17 +18,20 @@ def process_audio(file_path):
|
|
| 18 |
os.chdir(home_directory)
|
| 19 |
|
| 20 |
file_name_without_ext = os.path.splitext(os.path.basename(file_path))[0]
|
|
|
|
|
|
|
| 21 |
output_dir = os.path.join('basic_splits', file_name_without_ext)
|
| 22 |
ensure_directory_exists(output_dir)
|
| 23 |
os.chdir('basic_splits')
|
| 24 |
-
|
| 25 |
from moonarch_basic import BasicSplitter
|
| 26 |
splitter = BasicSplitter(file_path)
|
| 27 |
splitter.run()
|
| 28 |
st.write("Basic split process completed.")
|
|
|
|
| 29 |
|
| 30 |
-
|
| 31 |
-
os.
|
|
|
|
| 32 |
from moonarch_vocal_remover import VocalRemover
|
| 33 |
music_sep = VocalRemover(file_path)
|
| 34 |
music_sep.run()
|
|
@@ -37,13 +40,13 @@ def process_audio(file_path):
|
|
| 37 |
|
| 38 |
return [
|
| 39 |
os.path.join('basic_splits', file_name_without_ext, 'vocals.wav'),
|
| 40 |
-
os.path.join('vocal_remover', file_name_without_ext, 'accompaniment.wav'),
|
| 41 |
os.path.join('basic_splits', file_name_without_ext, 'bass.wav'),
|
| 42 |
os.path.join('basic_splits', file_name_without_ext, 'drums.wav')
|
| 43 |
]
|
| 44 |
|
| 45 |
# Streamlit app
|
| 46 |
-
st.title('Moonarch Music Analysis
|
| 47 |
st.header("Experience the Future of Sound")
|
| 48 |
st.write("""
|
| 49 |
Everything you need to create and release your music, including samples, plugins, unlimited distribution, and the world's best AI mastering engine.
|
|
@@ -103,3 +106,4 @@ if uploaded_file is not None:
|
|
| 103 |
)
|
| 104 |
else:
|
| 105 |
st.error(f"Error: {file} not found.")
|
|
|
|
|
|
| 18 |
os.chdir(home_directory)
|
| 19 |
|
| 20 |
file_name_without_ext = os.path.splitext(os.path.basename(file_path))[0]
|
| 21 |
+
|
| 22 |
+
# Basic Split
|
| 23 |
output_dir = os.path.join('basic_splits', file_name_without_ext)
|
| 24 |
ensure_directory_exists(output_dir)
|
| 25 |
os.chdir('basic_splits')
|
|
|
|
| 26 |
from moonarch_basic import BasicSplitter
|
| 27 |
splitter = BasicSplitter(file_path)
|
| 28 |
splitter.run()
|
| 29 |
st.write("Basic split process completed.")
|
| 30 |
+
os.chdir(home_directory)
|
| 31 |
|
| 32 |
+
# Vocal Remover within Basic Split
|
| 33 |
+
ensure_directory_exists(os.path.join('basic_splits', 'vocal_remover', file_name_without_ext))
|
| 34 |
+
os.chdir(os.path.join('basic_splits', 'vocal_remover', file_name_without_ext))
|
| 35 |
from moonarch_vocal_remover import VocalRemover
|
| 36 |
music_sep = VocalRemover(file_path)
|
| 37 |
music_sep.run()
|
|
|
|
| 40 |
|
| 41 |
return [
|
| 42 |
os.path.join('basic_splits', file_name_without_ext, 'vocals.wav'),
|
| 43 |
+
os.path.join('basic_splits', 'vocal_remover', file_name_without_ext, 'accompaniment.wav'),
|
| 44 |
os.path.join('basic_splits', file_name_without_ext, 'bass.wav'),
|
| 45 |
os.path.join('basic_splits', file_name_without_ext, 'drums.wav')
|
| 46 |
]
|
| 47 |
|
| 48 |
# Streamlit app
|
| 49 |
+
st.title('Moonarch Music Analysis')
|
| 50 |
st.header("Experience the Future of Sound")
|
| 51 |
st.write("""
|
| 52 |
Everything you need to create and release your music, including samples, plugins, unlimited distribution, and the world's best AI mastering engine.
|
|
|
|
| 106 |
)
|
| 107 |
else:
|
| 108 |
st.error(f"Error: {file} not found.")
|
| 109 |
+
st.write(f"Expected location: {file}")
|