aliabid94 HF staff commited on
Commit
68810d9
·
1 Parent(s): ada6e90

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +42 -43
app.py CHANGED
@@ -207,53 +207,52 @@ with iface:
207
  )
208
 
209
  with gr.Group():
210
- with gr.Box():
211
- textbox = gr.Textbox(
212
- value="The vibrant beat of Brazilian samba drums.",
213
- max_lines=1,
214
- label="Input text",
215
- info="Your text is important for the audio quality. Please ensure it is descriptive by using more adjectives.",
216
- elem_id="prompt-in",
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  )
218
- negative_textbox = gr.Textbox(
219
- value="Low quality.",
220
- max_lines=1,
221
- label="Negative prompt",
222
- info="Enter a negative prompt not to guide the audio generation. Selecting appropriate negative prompts can improve the audio quality significantly.",
223
- elem_id="prompt-in",
 
 
 
 
 
 
 
 
 
 
224
  )
225
 
226
- with gr.Accordion("Click to modify detailed configurations", open=False):
227
- seed = gr.Number(
228
- value=45,
229
- label="Seed",
230
- info="Change this value (any integer number) will lead to a different generation result.",
231
- )
232
- duration = gr.Slider(5, 15, value=10, step=2.5, label="Duration (seconds)")
233
- guidance_scale = gr.Slider(
234
- 0,
235
- 7,
236
- value=3.5,
237
- step=0.5,
238
- label="Guidance scale",
239
- info="Larger => better quality and relevancy to text; Smaller => better diversity",
240
- )
241
- n_candidates = gr.Slider(
242
- 1,
243
- 5,
244
- value=3,
245
- step=1,
246
- label="Number waveforms to generate",
247
- info="Automatic quality control. This number control the number of candidates (e.g., generate three audios and choose the best to show you). A larger value usually lead to better quality with heavier computation",
248
- )
249
-
250
- outputs = gr.Video(label="Output", elem_id="output-video")
251
- btn = gr.Button("Submit").style(full_width=True)
252
 
253
- with gr.Group(elem_id="share-btn-container", visible=False):
254
- community_icon = gr.HTML(community_icon_html)
255
- loading_icon = gr.HTML(loading_icon_html)
256
- share_button = gr.Button("Share to community", elem_id="share-btn")
257
 
258
  btn.click(
259
  text2audio,
 
207
  )
208
 
209
  with gr.Group():
210
+ textbox = gr.Textbox(
211
+ value="The vibrant beat of Brazilian samba drums.",
212
+ max_lines=1,
213
+ label="Input text",
214
+ info="Your text is important for the audio quality. Please ensure it is descriptive by using more adjectives.",
215
+ elem_id="prompt-in",
216
+ )
217
+ negative_textbox = gr.Textbox(
218
+ value="Low quality.",
219
+ max_lines=1,
220
+ label="Negative prompt",
221
+ info="Enter a negative prompt not to guide the audio generation. Selecting appropriate negative prompts can improve the audio quality significantly.",
222
+ elem_id="prompt-in",
223
+ )
224
+
225
+ with gr.Accordion("Click to modify detailed configurations", open=False):
226
+ seed = gr.Number(
227
+ value=45,
228
+ label="Seed",
229
+ info="Change this value (any integer number) will lead to a different generation result.",
230
  )
231
+ duration = gr.Slider(5, 15, value=10, step=2.5, label="Duration (seconds)")
232
+ guidance_scale = gr.Slider(
233
+ 0,
234
+ 7,
235
+ value=3.5,
236
+ step=0.5,
237
+ label="Guidance scale",
238
+ info="Larger => better quality and relevancy to text; Smaller => better diversity",
239
+ )
240
+ n_candidates = gr.Slider(
241
+ 1,
242
+ 5,
243
+ value=3,
244
+ step=1,
245
+ label="Number waveforms to generate",
246
+ info="Automatic quality control. This number control the number of candidates (e.g., generate three audios and choose the best to show you). A larger value usually lead to better quality with heavier computation",
247
  )
248
 
249
+ outputs = gr.Video(label="Output", elem_id="output-video")
250
+ btn = gr.Button("Submit").style(full_width=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
251
 
252
+ with gr.Group(elem_id="share-btn-container", visible=False):
253
+ community_icon = gr.HTML(community_icon_html)
254
+ loading_icon = gr.HTML(loading_icon_html)
255
+ share_button = gr.Button("Share to community", elem_id="share-btn")
256
 
257
  btn.click(
258
  text2audio,