Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -18,15 +18,6 @@ from src.saving_utils import *
|
|
18 |
from src.vis_utils import *
|
19 |
from src.bin.PROBE import run_probe
|
20 |
|
21 |
-
css = """
|
22 |
-
#processing-modal, #completion-modal {
|
23 |
-
position: fixed;
|
24 |
-
top: 50%;
|
25 |
-
left: 50%;
|
26 |
-
transform: translate(-50%, -50%);
|
27 |
-
z-index: 1000;
|
28 |
-
}
|
29 |
-
"""
|
30 |
|
31 |
def add_new_eval(
|
32 |
human_file,
|
@@ -40,22 +31,23 @@ def add_new_eval(
|
|
40 |
family_prediction_dataset,
|
41 |
save,
|
42 |
):
|
43 |
-
processing_info = gr.Info("Your submission is being processed..."
|
44 |
|
45 |
representation_name = model_name_textbox if revision_name_textbox == '' else revision_name_textbox
|
46 |
|
47 |
try:
|
48 |
results = run_probe(benchmark_types, representation_name, human_file, skempi_file, similarity_tasks, function_prediction_aspect, function_prediction_dataset, family_prediction_dataset)
|
49 |
except:
|
50 |
-
completion_info = gr.
|
|
|
51 |
|
52 |
|
53 |
if save:
|
54 |
save_results(representation_name, benchmark_types, results)
|
55 |
-
completion_info = gr.Info("Your submission has been processed and results are saved!"
|
56 |
|
57 |
else:
|
58 |
-
completion_info = gr.Info("Your submission has been processed!"
|
59 |
|
60 |
return 0
|
61 |
|
@@ -82,7 +74,7 @@ def update_leaderboard(selected_methods, selected_metrics):
|
|
82 |
updated_df = get_baseline_df(selected_methods, selected_metrics)
|
83 |
return updated_df
|
84 |
|
85 |
-
block = gr.Blocks(
|
86 |
|
87 |
with block:
|
88 |
gr.Markdown(LEADERBOARD_INTRODUCTION)
|
|
|
18 |
from src.vis_utils import *
|
19 |
from src.bin.PROBE import run_probe
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
def add_new_eval(
|
23 |
human_file,
|
|
|
31 |
family_prediction_dataset,
|
32 |
save,
|
33 |
):
|
34 |
+
processing_info = gr.Info("Your submission is being processed...")
|
35 |
|
36 |
representation_name = model_name_textbox if revision_name_textbox == '' else revision_name_textbox
|
37 |
|
38 |
try:
|
39 |
results = run_probe(benchmark_types, representation_name, human_file, skempi_file, similarity_tasks, function_prediction_aspect, function_prediction_dataset, family_prediction_dataset)
|
40 |
except:
|
41 |
+
completion_info = gr.Error("Your submission has not been processed. Please check your representation files!")
|
42 |
+
return -1
|
43 |
|
44 |
|
45 |
if save:
|
46 |
save_results(representation_name, benchmark_types, results)
|
47 |
+
completion_info = gr.Info("Your submission has been processed and results are saved!")
|
48 |
|
49 |
else:
|
50 |
+
completion_info = gr.Info("Your submission has been processed!")
|
51 |
|
52 |
return 0
|
53 |
|
|
|
74 |
updated_df = get_baseline_df(selected_methods, selected_metrics)
|
75 |
return updated_df
|
76 |
|
77 |
+
block = gr.Blocks()
|
78 |
|
79 |
with block:
|
80 |
gr.Markdown(LEADERBOARD_INTRODUCTION)
|