Scott Cogan commited on
Commit ·
33b2d23
1
Parent(s): 4b5824e
gradio
Browse files
app.py
CHANGED
|
@@ -375,8 +375,8 @@ with gr.Blocks() as demo:
|
|
| 375 |
|
| 376 |
def enable_run_button(profile):
|
| 377 |
if profile:
|
| 378 |
-
return
|
| 379 |
-
return
|
| 380 |
|
| 381 |
login_button.click(
|
| 382 |
fn=enable_run_button,
|
|
@@ -384,8 +384,13 @@ with gr.Blocks() as demo:
|
|
| 384 |
outputs=[run_button]
|
| 385 |
)
|
| 386 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 387 |
run_button.click(
|
| 388 |
-
fn=
|
| 389 |
inputs=[login_button],
|
| 390 |
outputs=[status_output, results_table]
|
| 391 |
)
|
|
|
|
| 375 |
|
| 376 |
def enable_run_button(profile):
|
| 377 |
if profile:
|
| 378 |
+
return True
|
| 379 |
+
return False
|
| 380 |
|
| 381 |
login_button.click(
|
| 382 |
fn=enable_run_button,
|
|
|
|
| 384 |
outputs=[run_button]
|
| 385 |
)
|
| 386 |
|
| 387 |
+
def run_evaluation(profile):
|
| 388 |
+
if not profile:
|
| 389 |
+
return "Please login first.", None
|
| 390 |
+
return run_and_submit_all(profile)
|
| 391 |
+
|
| 392 |
run_button.click(
|
| 393 |
+
fn=run_evaluation,
|
| 394 |
inputs=[login_button],
|
| 395 |
outputs=[status_output, results_table]
|
| 396 |
)
|