Spaces:
Running
Running
admin
commited on
Commit
·
a555556
1
Parent(s):
0ca52bf
try use diff dir for mp3 midi
Browse files- app.py +4 -1
- requirements.txt +1 -1
app.py
CHANGED
@@ -98,7 +98,10 @@ def music163_song_info(id: str):
|
|
98 |
def url_infer(song: str, cache_dir="./__pycache__/mode2"):
|
99 |
song_name = ""
|
100 |
clean_cache(cache_dir)
|
101 |
-
audio_path =
|
|
|
|
|
|
|
102 |
try:
|
103 |
if (is_url(song) and "163" in song and "?id=" in song) or song.isdigit():
|
104 |
song_id = get_1st_int(song.split("?id=")[-1])
|
|
|
98 |
def url_infer(song: str, cache_dir="./__pycache__/mode2"):
|
99 |
song_name = ""
|
100 |
clean_cache(cache_dir)
|
101 |
+
audio_path = "./__pycache__/output.mp3"
|
102 |
+
if os.path.exists(audio_path):
|
103 |
+
os.remove(audio_path)
|
104 |
+
|
105 |
try:
|
106 |
if (is_url(song) and "163" in song and "?id=" in song) or song.isdigit():
|
107 |
song_id = get_1st_int(song.split("?id=")[-1])
|
requirements.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
torch
|
2 |
pymupdf
|
3 |
music21
|
4 |
-
piano_transcription_inference
|
5 |
modelscope[framework]==1.18
|
6 |
librosa==0.9.2
|
|
|
1 |
torch
|
2 |
pymupdf
|
3 |
music21
|
4 |
+
piano_transcription_inference
|
5 |
modelscope[framework]==1.18
|
6 |
librosa==0.9.2
|