jadechoghari commited on
Commit
902a8d1
·
1 Parent(s): d973a6f

add examples

Browse files
Files changed (1) hide show
  1. app.py +8 -5
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="#000000", bars_color="#00FF00", bar_count=100, bar_width=1.5, animate=True)
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
- cache_examples="lazy"
 
 
 
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