Spaces:
Running
Running
mrfakename
commited on
Commit
•
272f73d
1
Parent(s):
8e5a590
Update app.py
Browse files
app.py
CHANGED
@@ -397,20 +397,11 @@ with gr.Blocks() as leaderboard:
|
|
397 |
|
398 |
# vote.load(reload, outputs=[aud1, aud2, model1, model2])
|
399 |
def makevisible(text):
|
400 |
-
yield (
|
401 |
-
gr.update(visible=True), # r1
|
402 |
-
gr.update(visible=True), # r2
|
403 |
-
None,
|
404 |
-
None,
|
405 |
-
None,
|
406 |
-
None,
|
407 |
-
None,
|
408 |
-
None,
|
409 |
-
)
|
410 |
time.sleep(5)
|
411 |
return (
|
412 |
-
|
413 |
-
|
|
|
414 |
None, # model1
|
415 |
None, # model2
|
416 |
'Hi', # prevmodel1
|
@@ -442,7 +433,7 @@ with gr.Blocks() as vote:
|
|
442 |
with gr.Row():
|
443 |
abetter = gr.Button("A is Better", variant='primary')
|
444 |
bbetter = gr.Button("B is Better", variant='primary')
|
445 |
-
btn.click(makevisible, inputs=text, outputs=[r1, r2, model1, model2, prevmodel1, aud1, prevmodel2, aud2])
|
446 |
|
447 |
# outputs = [aud1, aud2, model1, model2, useridstate, prevmodel1, prevmodel2]
|
448 |
# abetter.click(a_is_better, outputs=outputs, inputs=[model1, model2, useridstate])
|
|
|
397 |
|
398 |
# vote.load(reload, outputs=[aud1, aud2, model1, model2])
|
399 |
def makevisible(text):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
400 |
time.sleep(5)
|
401 |
return (
|
402 |
+
text,
|
403 |
+
gr.update(visible=True), # r1
|
404 |
+
gr.update(visible=True), # r2
|
405 |
None, # model1
|
406 |
None, # model2
|
407 |
'Hi', # prevmodel1
|
|
|
433 |
with gr.Row():
|
434 |
abetter = gr.Button("A is Better", variant='primary')
|
435 |
bbetter = gr.Button("B is Better", variant='primary')
|
436 |
+
btn.click(makevisible, inputs=text, outputs=[text, r1, r2, model1, model2, prevmodel1, aud1, prevmodel2, aud2])
|
437 |
|
438 |
# outputs = [aud1, aud2, model1, model2, useridstate, prevmodel1, prevmodel2]
|
439 |
# abetter.click(a_is_better, outputs=outputs, inputs=[model1, model2, useridstate])
|