Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,10 +12,6 @@ def ensure_directory_exists(directory):
|
|
| 12 |
if not os.path.exists(directory):
|
| 13 |
os.makedirs(directory)
|
| 14 |
|
| 15 |
-
# Function to check if the file exists
|
| 16 |
-
def file_exists(file_path):
|
| 17 |
-
return os.path.isfile(file_path)
|
| 18 |
-
|
| 19 |
# Function to process the audio
|
| 20 |
def process_audio(file_path):
|
| 21 |
# Ensure to navigate to the home directory first
|
|
@@ -31,8 +27,8 @@ def process_audio(file_path):
|
|
| 31 |
splitter.run()
|
| 32 |
st.write("Basic split process completed.")
|
| 33 |
|
| 34 |
-
ensure_directory_exists(os.path.join('
|
| 35 |
-
os.chdir(
|
| 36 |
from moonarch_vocal_remover import VocalRemover
|
| 37 |
music_sep = VocalRemover(file_path)
|
| 38 |
music_sep.run()
|
|
@@ -41,13 +37,13 @@ def process_audio(file_path):
|
|
| 41 |
|
| 42 |
return [
|
| 43 |
os.path.join('basic_splits', file_name_without_ext, 'vocals.wav'),
|
| 44 |
-
os.path.join('
|
| 45 |
os.path.join('basic_splits', file_name_without_ext, 'bass.wav'),
|
| 46 |
os.path.join('basic_splits', file_name_without_ext, 'drums.wav')
|
| 47 |
]
|
| 48 |
|
| 49 |
# Streamlit app
|
| 50 |
-
st.title('Moonarch Music Analysis')
|
| 51 |
st.header("Experience the Future of Sound")
|
| 52 |
st.write("""
|
| 53 |
Everything you need to create and release your music, including samples, plugins, unlimited distribution, and the world's best AI mastering engine.
|
|
@@ -107,4 +103,3 @@ if uploaded_file is not None:
|
|
| 107 |
)
|
| 108 |
else:
|
| 109 |
st.error(f"Error: {file} not found.")
|
| 110 |
-
st.write(f"Expected location: {file}")
|
|
|
|
| 12 |
if not os.path.exists(directory):
|
| 13 |
os.makedirs(directory)
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
# Function to process the audio
|
| 16 |
def process_audio(file_path):
|
| 17 |
# Ensure to navigate to the home directory first
|
|
|
|
| 27 |
splitter.run()
|
| 28 |
st.write("Basic split process completed.")
|
| 29 |
|
| 30 |
+
ensure_directory_exists(os.path.join('vocal_remover', file_name_without_ext))
|
| 31 |
+
os.chdir('vocal_remover')
|
| 32 |
from moonarch_vocal_remover import VocalRemover
|
| 33 |
music_sep = VocalRemover(file_path)
|
| 34 |
music_sep.run()
|
|
|
|
| 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: Basic Splitter')
|
| 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 |
)
|
| 104 |
else:
|
| 105 |
st.error(f"Error: {file} not found.")
|
|
|