Manmay Nakhashi commited on
Commit
36a9e0f
Β·
1 Parent(s): 040f54b

Add 5 long-form (~30s) examples to the Gradio Examples table

Browse files

Pairs richer multi-beat scenes with gen_duration=30s in the row data so
clicking generates a full half-minute clip:
- 30s β€’ Villain soliloquy (Harvey-Keitel-style)
- 30s β€’ Late-night radio monologue (old-movie host)
- 30s β€’ Stand-up wheeze-laugh (Conan-style)
- 30s β€’ Bedtime story (warm female narrator)
- 30s β€’ Sports commentary (Samuel-J-style)

Existing short examples remain with gen_duration=0 (auto).

Files changed (1) hide show
  1. app.py +62 -1
app.py CHANGED
@@ -103,6 +103,64 @@ EXAMPLES: list[tuple[str, str, str]] = [
103
  'A confident announcer speaks proudly, "And now, the moment you have all been waiting for." '
104
  'He chuckles knowingly, "Heheh, trust me, this one is going to blow you away."',
105
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  ]
107
 
108
 
@@ -222,7 +280,10 @@ with gr.Blocks(
222
  gr.Examples(
223
  label="🎬 Click any row to generate a sample",
224
  examples=[
225
- [name, prompt, voice_path, 2.5, 1.5, 1.1, 0.0, 10.0, 42]
 
 
 
226
  for name, voice_path, prompt in EXAMPLES
227
  ],
228
  example_labels=[name for name, _, _ in EXAMPLES],
 
103
  'A confident announcer speaks proudly, "And now, the moment you have all been waiting for." '
104
  'He chuckles knowingly, "Heheh, trust me, this one is going to blow you away."',
105
  ),
106
+ # ── Long-form examples (~30 s each) ───────────────────────────────────────
107
+ # These pair a richer multi-beat scene with gen_duration = 30 s in the
108
+ # Examples row below so the model is asked for a full half-minute clip.
109
+ (
110
+ "30s β€’ Villain soliloquy",
111
+ os.path.join(_VOICES_DIR, "male_harvey_keitel.mp3"),
112
+ 'A shadowy villain stands at the edge of his throne room, gazing into the dark. '
113
+ 'He speaks with slow, measured menace, "So, the little hero has come to finish me, has he?" '
114
+ 'He chuckles low and humourless, "Hehe, oh how delightfully predictable you mortals are." '
115
+ 'His voice hardens into ice, "I have lived ten thousand years. I have seen empires rise and fall like the tide." '
116
+ 'He scoffs, "And you think you, with your borrowed sword and your trembling hands, will be the one to end me?" '
117
+ 'A long pause. He whispers, almost tenderly, "I will give you a single chance to turn around and walk away." '
118
+ 'Then his voice rises with crushing finality, "Choose, child. The door behind you, or the grave at your feet."',
119
+ ),
120
+ (
121
+ "30s β€’ Late-night radio monologue",
122
+ os.path.join(_VOICES_DIR, "male_old_movie.wav"),
123
+ 'A radio host clears his throat softly into the microphone in the late hours of the night. '
124
+ 'He settles into a warm, smoky tone, "Good evening, dear listeners, and welcome back to the After Hours Hour." '
125
+ 'He sighs contentedly, "Mmm, what a night it has been. The rain is tapping at my window like an old friend." '
126
+ 'He chuckles softly, "Heheh, you know the kind of friend, the one that always shows up unannounced." '
127
+ 'His voice drops, intimate, "I want you to lean back, wherever you are. Pour yourself something warm." '
128
+ 'He pauses, breath audible, "Tonight we are going to talk about love, and loss, and the songs that hold us together." '
129
+ 'A smile in his voice, "And I have got the perfect record cued up to start us off, so stay right where you are."',
130
+ ),
131
+ (
132
+ "30s β€’ Stand-up wheeze-laugh",
133
+ os.path.join(_VOICES_DIR, "male_conan.mp3"),
134
+ 'A talk show host walks out and the crowd is already roaring. He gasps in mock outrage, "No! No no no!" '
135
+ 'He bursts into uncontrollable laughter, "Hahahaha, oh my god, oh my god, you cannot do that to me already!" '
136
+ 'He wheezes, gasping for air, "I have not even, hahaha, I have not even said hello yet!" '
137
+ 'He tries to compose himself, "Okay, okay, just give me a second here, give me a second." '
138
+ 'He clears his throat dramatically, "Ahem. Good evening, ladies and gentlemen." '
139
+ 'Then he loses it again, "Hahaha! No, sorry, sorry, I just remembered what happened in the green room." '
140
+ 'He pants, "Oh man, oh man, this is going to be one of those nights, I can already tell."',
141
+ ),
142
+ (
143
+ "30s β€’ Bedtime story",
144
+ os.path.join(_VOICES_DIR, "female_shadowheart.wav"),
145
+ 'A mother sits at the edge of her child\'s bed in the dim glow of a single lamp. '
146
+ 'She speaks softly, "Once upon a time, in a kingdom by the sea, there lived a small dragon named Pip." '
147
+ 'She lowers her voice playfully, "Now Pip was not like the other dragons. Pip was afraid of fire." '
148
+ 'She smiles warmly, "Mmm, can you imagine? A dragon who was afraid of his own breath?" '
149
+ 'A gentle pause, "But Pip had something the other dragons did not have. Pip had courage in his heart." '
150
+ 'She hums softly, "Mmmmm. And one cold winter night, when the village below ran out of warmth..." '
151
+ 'Her voice drops to a whisper, "Pip closed his eyes, took a deep, deep breath, and remembered who he was."',
152
+ ),
153
+ (
154
+ "30s β€’ Sports commentary",
155
+ os.path.join(_VOICES_DIR, "male_samuel_j.mp3"),
156
+ 'A sports commentator leans into the microphone with the crowd roaring around him. '
157
+ 'He shouts with rising energy, "Oh, this is it! This is the moment we have been waiting for all season!" '
158
+ 'He pants between phrases, "She has the ball at midfield, she is dribbling past one, past two!" '
159
+ 'A sudden gasp, "Oh my, what a move! Did you see that footwork, ladies and gentlemen?" '
160
+ 'His voice climbs, "She is twenty yards out, fifteen yards out, she winds back, and she SHOOTS!" '
161
+ 'A massive pause, then, "GOAAAAAAL! What a strike! What an absolute thunderbolt of a goal!" '
162
+ 'He laughs in disbelief, "Hahaha! Unbelievable! Forty thousand fans on their feet, and so am I!"',
163
+ ),
164
  ]
165
 
166
 
 
280
  gr.Examples(
281
  label="🎬 Click any row to generate a sample",
282
  examples=[
283
+ # rows tagged "30s β€’" force a 30-second target duration; the rest
284
+ # use the prompt-driven auto estimate (gen_dur = 0).
285
+ [name, prompt, voice_path, 2.5, 1.5, 1.1,
286
+ 30.0 if name.startswith("30s") else 0.0, 10.0, 42]
287
  for name, voice_path, prompt in EXAMPLES
288
  ],
289
  example_labels=[name for name, _, _ in EXAMPLES],