put examples back
Browse files
app.py
CHANGED
@@ -90,6 +90,7 @@ def make_waveform(*args, **kwargs):
|
|
90 |
|
91 |
|
92 |
# write a similar function to make_waveform, but for video generated using an image with ans aspect ration of 16:9
|
|
|
93 |
def make_video(*args, **kwargs):
|
94 |
# Further remove some warnings.
|
95 |
be = time.time()
|
@@ -288,49 +289,43 @@ def ui_full(launch_kwargs):
|
|
288 |
radio.change(toggle_audio_src, radio, [
|
289 |
melody], queue=False, show_progress=False)
|
290 |
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
# "MultiBand_Diffusion"
|
329 |
-
# ],
|
330 |
-
# ],
|
331 |
-
# inputs=[text, melody, model, decoder],
|
332 |
-
# outputs=[output]
|
333 |
-
# )
|
334 |
gr.Markdown(
|
335 |
"""
|
336 |
### More details
|
@@ -501,6 +496,7 @@ if __name__ == "__main__":
|
|
501 |
ui_batched(launch_kwargs)
|
502 |
# ui_full(launch_kwargs)
|
503 |
else:
|
|
|
504 |
USE_DIFFUSION = False
|
505 |
-
ui_full(launch_kwargs)
|
506 |
-
|
|
|
90 |
|
91 |
|
92 |
# write a similar function to make_waveform, but for video generated using an image with ans aspect ration of 16:9
|
93 |
+
|
94 |
def make_video(*args, **kwargs):
|
95 |
# Further remove some warnings.
|
96 |
be = time.time()
|
|
|
289 |
radio.change(toggle_audio_src, radio, [
|
290 |
melody], queue=False, show_progress=False)
|
291 |
|
292 |
+
gr.Examples(
|
293 |
+
fn=predict_full,
|
294 |
+
examples=[
|
295 |
+
[
|
296 |
+
"An 80s driving pop song with heavy drums and synth pads in the background",
|
297 |
+
"./assets/bach.mp3",
|
298 |
+
"facebook/musicgen-melody",
|
299 |
+
"Default"
|
300 |
+
],
|
301 |
+
[
|
302 |
+
"90s rock song with electric guitar and heavy drums",
|
303 |
+
None,
|
304 |
+
"facebook/musicgen-medium",
|
305 |
+
"Default"
|
306 |
+
],
|
307 |
+
[
|
308 |
+
"a light and cheerly EDM track, with syncopated drums, aery pads, and strong emotions",
|
309 |
+
"./assets/bach.mp3",
|
310 |
+
"facebook/musicgen-melody",
|
311 |
+
"Default"
|
312 |
+
],
|
313 |
+
[
|
314 |
+
"lofi slow bpm electro chill with organic samples",
|
315 |
+
None,
|
316 |
+
"facebook/musicgen-medium",
|
317 |
+
"Default"
|
318 |
+
],
|
319 |
+
[
|
320 |
+
"Punk rock with loud drum and power guitar",
|
321 |
+
None,
|
322 |
+
"facebook/musicgen-medium",
|
323 |
+
"MultiBand_Diffusion"
|
324 |
+
],
|
325 |
+
],
|
326 |
+
inputs=[text, melody, model, decoder],
|
327 |
+
outputs=[output]
|
328 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
gr.Markdown(
|
330 |
"""
|
331 |
### More details
|
|
|
496 |
ui_batched(launch_kwargs)
|
497 |
# ui_full(launch_kwargs)
|
498 |
else:
|
499 |
+
# Space > https://huggingface.co/spaces/MWire/zest-2023
|
500 |
USE_DIFFUSION = False
|
501 |
+
# ui_full(launch_kwargs)
|
502 |
+
ui_batched(launch_kwargs)
|