Spaces:
Runtime error
Runtime error
Change the theme
Browse files
app.py
CHANGED
@@ -44,6 +44,7 @@ def prepare_output_file(tokenizer_output):
|
|
44 |
wav_output = midi_output.replace(".mid", ".wav")
|
45 |
midi2audio.FluidSynth().midi_to_audio(midi_output, wav_output)
|
46 |
|
|
|
47 |
return wav_output, wav_output, midi_output
|
48 |
|
49 |
def inference(file_uploaded, composer):
|
@@ -58,8 +59,9 @@ def inference(file_uploaded, composer):
|
|
58 |
return prepare_output_file(tokenizer_output)
|
59 |
|
60 |
|
61 |
-
|
62 |
-
|
|
|
63 |
|
64 |
with block:
|
65 |
gr.HTML(
|
@@ -133,4 +135,5 @@ with block:
|
|
133 |
)
|
134 |
|
135 |
block.launch(debug=False)
|
136 |
-
shutil.rmtree("./midi_wav_outputs")
|
|
|
|
44 |
wav_output = midi_output.replace(".mid", ".wav")
|
45 |
midi2audio.FluidSynth().midi_to_audio(midi_output, wav_output)
|
46 |
|
47 |
+
from IPython.display import Audio
|
48 |
return wav_output, wav_output, midi_output
|
49 |
|
50 |
def inference(file_uploaded, composer):
|
|
|
59 |
return prepare_output_file(tokenizer_output)
|
60 |
|
61 |
|
62 |
+
# Thanks a lot to "https://huggingface.co/Taithrah" for this theme.
|
63 |
+
# taken from https://huggingface.co/spaces/NoCrypt/miku
|
64 |
+
block = gr.Blocks(theme="Taithrah/Minimal")
|
65 |
|
66 |
with block:
|
67 |
gr.HTML(
|
|
|
135 |
)
|
136 |
|
137 |
block.launch(debug=False)
|
138 |
+
shutil.rmtree("./midi_wav_outputs")
|
139 |
+
shutil.rmtree("./yt_dir")
|