Spaces:
Sleeping
Sleeping
jadechoghari
commited on
Commit
โข
902a8d1
1
Parent(s):
d973a6f
add examples
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ def generate_waveform(description):
|
|
31 |
# else:
|
32 |
# return "Error: Failed to generate the waveform."
|
33 |
if os.path.exists(generated_file_path):
|
34 |
-
waveform_video = gr.make_waveform(audio=generated_file_path, bg_color="#
|
35 |
return waveform_video, generated_file_path
|
36 |
else:
|
37 |
return "Error: Failed to generate the waveform."
|
@@ -63,10 +63,13 @@ iface = gr.Interface(
|
|
63 |
outputs=[gr.Video(label="Watch the Waveform ๐ผ"), gr.Audio(label="Download the Music ๐ถ")],
|
64 |
description=intro,
|
65 |
examples=[
|
66 |
-
["A modern synthesizer creating futuristic soundscapes."],
|
67 |
-
["Acoustic ballad with heartfelt lyrics and soft piano."]
|
68 |
-
],
|
69 |
-
|
|
|
|
|
|
|
70 |
# cache_examples=True
|
71 |
)
|
72 |
|
|
|
31 |
# else:
|
32 |
# return "Error: Failed to generate the waveform."
|
33 |
if os.path.exists(generated_file_path):
|
34 |
+
waveform_video = gr.make_waveform(audio=generated_file_path, fg_alpha=0.7, bg_color="#09090a", bars_color="#00FF00", bar_count=100, bar_width=0.4, animate=True)
|
35 |
return waveform_video, generated_file_path
|
36 |
else:
|
37 |
return "Error: Failed to generate the waveform."
|
|
|
63 |
outputs=[gr.Video(label="Watch the Waveform ๐ผ"), gr.Audio(label="Download the Music ๐ถ")],
|
64 |
description=intro,
|
65 |
examples=[
|
66 |
+
["๐น A modern synthesizer creating futuristic soundscapes."],
|
67 |
+
["๐ธ Acoustic ballad with heartfelt lyrics and soft piano."],
|
68 |
+
["๐ A deep bassline mixed with upbeat electronic synths, creating a club anthem."],
|
69 |
+
["๐ป Melodic orchestral composition with a build-up of strings and percussion, evoking cinematic tension."],
|
70 |
+
["๐ Sad song of two lovers who never talk again, starting intensely with emotions and then gradually fading down into silence."]
|
71 |
+
],
|
72 |
+
cache_examples="lazy",
|
73 |
# cache_examples=True
|
74 |
)
|
75 |
|