Spaces:
Runtime error
Runtime error
sweetcocoa
commited on
Commit
·
b069716
1
Parent(s):
44ac17e
update url
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ def model_load():
|
|
14 |
config = OmegaConf.load("config.yaml")
|
15 |
wrapper = TransformerWrapper(config)
|
16 |
wrapper = wrapper.load_from_checkpoint(
|
17 |
-
"https://huggingface.co/sweetcocoa/pop2piano/
|
18 |
config=config,
|
19 |
).cuda()
|
20 |
model_id = "dpipqxiy"
|
@@ -27,6 +27,7 @@ def main():
|
|
27 |
wrapper, model_id, config = model_load()
|
28 |
composers = list(config.composer_to_feature_token.keys())
|
29 |
dest_dir = "ytsamples"
|
|
|
30 |
composer = st.selectbox(label="Arranger", options=composers)
|
31 |
file_up = st.file_uploader("Upload an audio", type=["mp3", "wav"])
|
32 |
|
@@ -47,7 +48,6 @@ def main():
|
|
47 |
show_plot=False,
|
48 |
save_midi=True,
|
49 |
save_mix=True,
|
50 |
-
vqvae=None,
|
51 |
)
|
52 |
|
53 |
with open(midi_path, "rb") as midi_f:
|
|
|
14 |
config = OmegaConf.load("config.yaml")
|
15 |
wrapper = TransformerWrapper(config)
|
16 |
wrapper = wrapper.load_from_checkpoint(
|
17 |
+
"https://huggingface.co/sweetcocoa/pop2piano/resolve/main/model-1999-val_0.67311615.ckpt",
|
18 |
config=config,
|
19 |
).cuda()
|
20 |
model_id = "dpipqxiy"
|
|
|
27 |
wrapper, model_id, config = model_load()
|
28 |
composers = list(config.composer_to_feature_token.keys())
|
29 |
dest_dir = "ytsamples"
|
30 |
+
os.makedirs(dest_dir, exist_ok=True)
|
31 |
composer = st.selectbox(label="Arranger", options=composers)
|
32 |
file_up = st.file_uploader("Upload an audio", type=["mp3", "wav"])
|
33 |
|
|
|
48 |
show_plot=False,
|
49 |
save_midi=True,
|
50 |
save_mix=True,
|
|
|
51 |
)
|
52 |
|
53 |
with open(midi_path, "rb") as midi_f:
|