Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
mrfakename
commited on
Commit
•
b13c85b
1
Parent(s):
5404187
don't vote twice!
Browse files
app.py
CHANGED
@@ -357,7 +357,7 @@ def reload(chosenmodel1=None, chosenmodel2=None, userid=None):
|
|
357 |
# if chosenmodel1: out.append(f'This model was {chosenmodel1}')
|
358 |
# if chosenmodel2: out.append(f'This model was {chosenmodel2}')
|
359 |
# return out
|
360 |
-
return (f'This model was {chosenmodel1}', f'This model was {chosenmodel2}')
|
361 |
|
362 |
with gr.Blocks() as leaderboard:
|
363 |
gr.Markdown(LDESC)
|
@@ -463,7 +463,7 @@ with gr.Blocks() as vote:
|
|
463 |
outputs = [text, btn, r1, r2, model1, model2, prevmodel1, aud1, prevmodel2, aud2]
|
464 |
btn.click(synthandreturn, inputs=[text], outputs=outputs)
|
465 |
|
466 |
-
nxt_outputs = [prevmodel1, prevmodel2]
|
467 |
abetter.click(a_is_better, outputs=nxt_outputs, inputs=[model1, model2, useridstate])
|
468 |
bbetter.click(b_is_better, outputs=nxt_outputs, inputs=[model1, model2, useridstate])
|
469 |
# skipbtn.click(b_is_better, outputs=outputs, inputs=[model1, model2, useridstate])
|
|
|
357 |
# if chosenmodel1: out.append(f'This model was {chosenmodel1}')
|
358 |
# if chosenmodel2: out.append(f'This model was {chosenmodel2}')
|
359 |
# return out
|
360 |
+
return (f'This model was {chosenmodel1}', f'This model was {chosenmodel2}', gr.update(interactive=False), gr.update(interactive=False))
|
361 |
|
362 |
with gr.Blocks() as leaderboard:
|
363 |
gr.Markdown(LDESC)
|
|
|
463 |
outputs = [text, btn, r1, r2, model1, model2, prevmodel1, aud1, prevmodel2, aud2]
|
464 |
btn.click(synthandreturn, inputs=[text], outputs=outputs)
|
465 |
|
466 |
+
nxt_outputs = [prevmodel1, prevmodel2, abetter, bbetter]
|
467 |
abetter.click(a_is_better, outputs=nxt_outputs, inputs=[model1, model2, useridstate])
|
468 |
bbetter.click(b_is_better, outputs=nxt_outputs, inputs=[model1, model2, useridstate])
|
469 |
# skipbtn.click(b_is_better, outputs=outputs, inputs=[model1, model2, useridstate])
|