Update app.py
Browse files
app.py
CHANGED
@@ -247,7 +247,7 @@ header p {
|
|
247 |
background: #ffffff;
|
248 |
border-radius: 12px;
|
249 |
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
|
250 |
-
max-width:
|
251 |
}
|
252 |
|
253 |
/* Post-Tabs Section */
|
@@ -306,7 +306,7 @@ footer h2 {
|
|
306 |
}
|
307 |
|
308 |
footer p {
|
309 |
-
font-size:
|
310 |
line-height: 1.6;
|
311 |
margin-bottom: 20px;
|
312 |
}
|
@@ -430,6 +430,11 @@ with gr.Blocks(css=css_tech_theme) as demo:
|
|
430 |
eval_status = gr.Textbox(label="Evaluation Status", interactive=False)
|
431 |
submit_button = gr.Button("Prove and Submit to Leaderboard", visible=False) # Initially hidden
|
432 |
def handle_evaluation(file, model_name):
|
|
|
|
|
|
|
|
|
|
|
433 |
# Perform evaluation
|
434 |
status, leaderboard = evaluate_predictions(file, model_name, add_to_leaderboard=False)
|
435 |
if leaderboard.empty:
|
|
|
247 |
background: #ffffff;
|
248 |
border-radius: 12px;
|
249 |
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
|
250 |
+
/* max-width: 1300px; /* change 1 */ */
|
251 |
}
|
252 |
|
253 |
/* Post-Tabs Section */
|
|
|
306 |
}
|
307 |
|
308 |
footer p {
|
309 |
+
font-size: 0.8em;
|
310 |
line-height: 1.6;
|
311 |
margin-bottom: 20px;
|
312 |
}
|
|
|
430 |
eval_status = gr.Textbox(label="Evaluation Status", interactive=False)
|
431 |
submit_button = gr.Button("Prove and Submit to Leaderboard", visible=False) # Initially hidden
|
432 |
def handle_evaluation(file, model_name):
|
433 |
+
# Check if required inputs are provided
|
434 |
+
if not file:
|
435 |
+
return "Error: Please upload a prediction file.", 0, gr.update(visible=False)
|
436 |
+
if not model_name or model_name.strip() == "":
|
437 |
+
return "Error: Please enter a model name.", 0, gr.update(visible=False)
|
438 |
# Perform evaluation
|
439 |
status, leaderboard = evaluate_predictions(file, model_name, add_to_leaderboard=False)
|
440 |
if leaderboard.empty:
|