Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
mrfakename
commited on
Commit
•
88f76ee
1
Parent(s):
ee22100
Update app.py
Browse files
app.py
CHANGED
@@ -442,7 +442,7 @@ def synthandreturn(text):
|
|
442 |
if not text:
|
443 |
raise gr.Error(f'You did not enter any text')
|
444 |
# Get two random models
|
445 |
-
mdl1, mdl2 = random.sample(AVAILABLE_MODELS.keys(), 2)
|
446 |
return (
|
447 |
text,
|
448 |
"Synthesize",
|
@@ -477,12 +477,12 @@ with gr.Blocks() as vote:
|
|
477 |
with gr.Group():
|
478 |
aud1 = gr.Audio(interactive=False, show_label=False, show_download_button=False, show_share_button=False, waveform_options={'waveform_progress_color': '#3C82F6'})
|
479 |
abetter = gr.Button("A is better", variant='primary')
|
480 |
-
prevmodel1 = gr.Textbox(interactive=False, show_label=False, container=False, value="Vote to reveal model A", text_align="center", lines=1, max_lines=1)
|
481 |
with gr.Column():
|
482 |
with gr.Group():
|
483 |
aud2 = gr.Audio(interactive=False, show_label=False, show_download_button=False, show_share_button=False, waveform_options={'waveform_progress_color': '#3C82F6'})
|
484 |
bbetter = gr.Button("B is better", variant='primary')
|
485 |
-
prevmodel2 = gr.Textbox(interactive=False, show_label=False, container=False, value="Vote to reveal model B", text_align="center", lines=1, max_lines=1)
|
486 |
# outputs = [text, btn, r2, model1, model2, prevmodel1, aud1, prevmodel2, aud2, abetter, bbetter]
|
487 |
outputs = [text, btn, r2, model1, model2, aud1, aud2, abetter, bbetter]
|
488 |
btn.click(synthandreturn, inputs=[text], outputs=outputs)
|
|
|
442 |
if not text:
|
443 |
raise gr.Error(f'You did not enter any text')
|
444 |
# Get two random models
|
445 |
+
mdl1, mdl2 = random.sample(list(AVAILABLE_MODELS.keys()), 2)
|
446 |
return (
|
447 |
text,
|
448 |
"Synthesize",
|
|
|
477 |
with gr.Group():
|
478 |
aud1 = gr.Audio(interactive=False, show_label=False, show_download_button=False, show_share_button=False, waveform_options={'waveform_progress_color': '#3C82F6'})
|
479 |
abetter = gr.Button("A is better", variant='primary')
|
480 |
+
prevmodel1 = gr.Textbox(interactive=False, show_label=False, container=False, value="Vote to reveal model A", text_align="center", lines=1, max_lines=1, visible=False)
|
481 |
with gr.Column():
|
482 |
with gr.Group():
|
483 |
aud2 = gr.Audio(interactive=False, show_label=False, show_download_button=False, show_share_button=False, waveform_options={'waveform_progress_color': '#3C82F6'})
|
484 |
bbetter = gr.Button("B is better", variant='primary')
|
485 |
+
prevmodel2 = gr.Textbox(interactive=False, show_label=False, container=False, value="Vote to reveal model B", text_align="center", lines=1, max_lines=1, visible=False)
|
486 |
# outputs = [text, btn, r2, model1, model2, prevmodel1, aud1, prevmodel2, aud2, abetter, bbetter]
|
487 |
outputs = [text, btn, r2, model1, model2, aud1, aud2, abetter, bbetter]
|
488 |
btn.click(synthandreturn, inputs=[text], outputs=outputs)
|