mrfakename commited on
Commit
0636bf7
1 Parent(s): ec31075

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +62 -18
app.py CHANGED
@@ -157,6 +157,10 @@ Recently, many new open-access speech synthesis models have been made available
157
  The TTS Arena is an attempt to benchmark these models and find the highest-quality models available to the community.
158
 
159
  {request}
 
 
 
 
160
  """.strip()
161
  LDESC = """
162
  ## Leaderboard
@@ -347,23 +351,62 @@ with gr.Blocks() as leaderboard:
347
  reloadbtn.click(get_leaderboard, outputs=[df])
348
  gr.Markdown("DISCLAIMER: The licenses listed may not be accurate or up to date, you are responsible for checking the licenses before using the models. Also note that some models may have additional usage restrictions.")
349
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
350
  with gr.Blocks() as vote:
351
  useridstate = gr.State()
352
  gr.Markdown(INSTR)
353
- # gr.LoginButton()
354
  with gr.Row():
355
  gr.HTML('<div align="left"><h3>Model A</h3></div>')
356
  gr.HTML('<div align="right"><h3>Model B</h3></div>')
357
  model1 = gr.Textbox(interactive=False, visible=False, lines=1, max_lines=1)
358
  model2 = gr.Textbox(interactive=False, visible=False, lines=1, max_lines=1)
359
- # with gr.Group():
360
- # with gr.Row():
361
- # prevmodel1 = gr.Textbox(interactive=False, show_label=False, container=False, value="Vote to reveal model A")
362
- # prevmodel2 = gr.Textbox(interactive=False, show_label=False, container=False, value="Vote to reveal model B", text_align="right")
363
- # with gr.Row():
364
- # aud1 = gr.Audio(interactive=False, show_label=False, show_download_button=False, show_share_button=False, waveform_options={'waveform_progress_color': '#3C82F6'})
365
- # aud2 = gr.Audio(interactive=False, show_label=False, show_download_button=False, show_share_button=False, waveform_options={'waveform_progress_color': '#3C82F6'})
366
- with gr.Group():
367
  with gr.Row():
368
  with gr.Column():
369
  with gr.Group():
@@ -375,23 +418,24 @@ with gr.Blocks() as vote:
375
  aud2 = gr.Audio(interactive=False, show_label=False, show_download_button=False, show_share_button=False, waveform_options={'waveform_progress_color': '#3C82F6'})
376
 
377
 
378
- with gr.Row():
379
  abetter = gr.Button("A is Better", variant='primary', scale=4)
380
  # skipbtn = gr.Button("Skip", scale=1)
381
  bbetter = gr.Button("B is Better", variant='primary', scale=4)
382
- with gr.Row():
383
  bothbad = gr.Button("Both are Bad", scale=2)
384
  skipbtn = gr.Button("Skip", scale=1)
385
  bothgood = gr.Button("Both are Good", scale=2)
386
- outputs = [aud1, aud2, model1, model2, useridstate, prevmodel1, prevmodel2]
387
- abetter.click(a_is_better, outputs=outputs, inputs=[model1, model2, useridstate])
388
- bbetter.click(b_is_better, outputs=outputs, inputs=[model1, model2, useridstate])
389
- skipbtn.click(b_is_better, outputs=outputs, inputs=[model1, model2, useridstate])
 
 
 
390
 
391
- bothbad.click(both_bad, outputs=outputs, inputs=[model1, model2, useridstate])
392
- bothgood.click(both_good, outputs=outputs, inputs=[model1, model2, useridstate])
393
 
394
- vote.load(reload, outputs=[aud1, aud2, model1, model2])
395
  with gr.Blocks() as about:
396
  gr.Markdown(ABOUT)
397
  with gr.Blocks() as admin:
 
157
  The TTS Arena is an attempt to benchmark these models and find the highest-quality models available to the community.
158
 
159
  {request}
160
+
161
+ ### Privacy Statement
162
+
163
+ We may store text you enter and generated audio. We store a unique ID for each session.
164
  """.strip()
165
  LDESC = """
166
  ## Leaderboard
 
351
  reloadbtn.click(get_leaderboard, outputs=[df])
352
  gr.Markdown("DISCLAIMER: The licenses listed may not be accurate or up to date, you are responsible for checking the licenses before using the models. Also note that some models may have additional usage restrictions.")
353
 
354
+ # with gr.Blocks() as vote:
355
+ # useridstate = gr.State()
356
+ # gr.Markdown(INSTR)
357
+ # # gr.LoginButton()
358
+ # with gr.Row():
359
+ # gr.HTML('<div align="left"><h3>Model A</h3></div>')
360
+ # gr.HTML('<div align="right"><h3>Model B</h3></div>')
361
+ # model1 = gr.Textbox(interactive=False, visible=False, lines=1, max_lines=1)
362
+ # model2 = gr.Textbox(interactive=False, visible=False, lines=1, max_lines=1)
363
+ # # with gr.Group():
364
+ # # with gr.Row():
365
+ # # prevmodel1 = gr.Textbox(interactive=False, show_label=False, container=False, value="Vote to reveal model A")
366
+ # # prevmodel2 = gr.Textbox(interactive=False, show_label=False, container=False, value="Vote to reveal model B", text_align="right")
367
+ # # with gr.Row():
368
+ # # aud1 = gr.Audio(interactive=False, show_label=False, show_download_button=False, show_share_button=False, waveform_options={'waveform_progress_color': '#3C82F6'})
369
+ # # aud2 = gr.Audio(interactive=False, show_label=False, show_download_button=False, show_share_button=False, waveform_options={'waveform_progress_color': '#3C82F6'})
370
+ # with gr.Group():
371
+ # with gr.Row():
372
+ # with gr.Column():
373
+ # with gr.Group():
374
+ # prevmodel1 = gr.Textbox(interactive=False, show_label=False, container=False, value="Vote to reveal model A", lines=1, max_lines=1)
375
+ # aud1 = gr.Audio(interactive=False, show_label=False, show_download_button=False, show_share_button=False, waveform_options={'waveform_progress_color': '#3C82F6'})
376
+ # with gr.Column():
377
+ # with gr.Group():
378
+ # prevmodel2 = gr.Textbox(interactive=False, show_label=False, container=False, value="Vote to reveal model B", text_align="right", lines=1, max_lines=1)
379
+ # aud2 = gr.Audio(interactive=False, show_label=False, show_download_button=False, show_share_button=False, waveform_options={'waveform_progress_color': '#3C82F6'})
380
+
381
+
382
+ # with gr.Row():
383
+ # abetter = gr.Button("A is Better", variant='primary', scale=4)
384
+ # # skipbtn = gr.Button("Skip", scale=1)
385
+ # bbetter = gr.Button("B is Better", variant='primary', scale=4)
386
+ # with gr.Row():
387
+ # bothbad = gr.Button("Both are Bad", scale=2)
388
+ # skipbtn = gr.Button("Skip", scale=1)
389
+ # bothgood = gr.Button("Both are Good", scale=2)
390
+ # outputs = [aud1, aud2, model1, model2, useridstate, prevmodel1, prevmodel2]
391
+ # abetter.click(a_is_better, outputs=outputs, inputs=[model1, model2, useridstate])
392
+ # bbetter.click(b_is_better, outputs=outputs, inputs=[model1, model2, useridstate])
393
+ # skipbtn.click(b_is_better, outputs=outputs, inputs=[model1, model2, useridstate])
394
+
395
+ # bothbad.click(both_bad, outputs=outputs, inputs=[model1, model2, useridstate])
396
+ # bothgood.click(both_good, outputs=outputs, inputs=[model1, model2, useridstate])
397
+
398
+ # vote.load(reload, outputs=[aud1, aud2, model1, model2])
399
  with gr.Blocks() as vote:
400
  useridstate = gr.State()
401
  gr.Markdown(INSTR)
 
402
  with gr.Row():
403
  gr.HTML('<div align="left"><h3>Model A</h3></div>')
404
  gr.HTML('<div align="right"><h3>Model B</h3></div>')
405
  model1 = gr.Textbox(interactive=False, visible=False, lines=1, max_lines=1)
406
  model2 = gr.Textbox(interactive=False, visible=False, lines=1, max_lines=1)
407
+
408
+ text = gr.Textbox(label="Enter text to synthesize", info="By entering text, you certify that it is either in the public domain or, if you are its author, you dedicate it into the public domain. You also must agree to the privacy statement in the About page.")
409
+ with gr.Group(visible=False):
 
 
 
 
 
410
  with gr.Row():
411
  with gr.Column():
412
  with gr.Group():
 
418
  aud2 = gr.Audio(interactive=False, show_label=False, show_download_button=False, show_share_button=False, waveform_options={'waveform_progress_color': '#3C82F6'})
419
 
420
 
421
+ with gr.Row(visible=False):
422
  abetter = gr.Button("A is Better", variant='primary', scale=4)
423
  # skipbtn = gr.Button("Skip", scale=1)
424
  bbetter = gr.Button("B is Better", variant='primary', scale=4)
425
+ with gr.Row(visible=False):
426
  bothbad = gr.Button("Both are Bad", scale=2)
427
  skipbtn = gr.Button("Skip", scale=1)
428
  bothgood = gr.Button("Both are Good", scale=2)
429
+ # outputs = [aud1, aud2, model1, model2, useridstate, prevmodel1, prevmodel2]
430
+ # abetter.click(a_is_better, outputs=outputs, inputs=[model1, model2, useridstate])
431
+ # bbetter.click(b_is_better, outputs=outputs, inputs=[model1, model2, useridstate])
432
+ # skipbtn.click(b_is_better, outputs=outputs, inputs=[model1, model2, useridstate])
433
+
434
+ # bothbad.click(both_bad, outputs=outputs, inputs=[model1, model2, useridstate])
435
+ # bothgood.click(both_good, outputs=outputs, inputs=[model1, model2, useridstate])
436
 
437
+ # vote.load(reload, outputs=[aud1, aud2, model1, model2])
 
438
 
 
439
  with gr.Blocks() as about:
440
  gr.Markdown(ABOUT)
441
  with gr.Blocks() as admin: