Spaces:
Running
Running
michal
commited on
Commit
·
15007e1
1
Parent(s):
67f2bfa
Upload
Browse files- app.py +0 -5
- src/structures/ldek_structure.py +8 -9
app.py
CHANGED
@@ -100,11 +100,6 @@ with main:
|
|
100 |
# columns_selector.change(update_dataframe, inputs=columns_selector, outputs=data_component_ldek)
|
101 |
|
102 |
gr.Markdown("EN")
|
103 |
-
# columns_selector = gr.CheckboxGroup(
|
104 |
-
# choices=ORDER_LIST_LDEK,
|
105 |
-
# label="Select columns to display",
|
106 |
-
# value=ORDER_LIST_LDEK,
|
107 |
-
# )
|
108 |
data_component_ldek = gr.components.Dataframe(
|
109 |
value=LDEK_EN_ACCS,
|
110 |
headers=COLUMN_HEADERS_LDEK_EN,
|
|
|
100 |
# columns_selector.change(update_dataframe, inputs=columns_selector, outputs=data_component_ldek)
|
101 |
|
102 |
gr.Markdown("EN")
|
|
|
|
|
|
|
|
|
|
|
103 |
data_component_ldek = gr.components.Dataframe(
|
104 |
value=LDEK_EN_ACCS,
|
105 |
headers=COLUMN_HEADERS_LDEK_EN,
|
src/structures/ldek_structure.py
CHANGED
@@ -63,9 +63,9 @@ with open(file_path, 'r', encoding='utf-8') as file:
|
|
63 |
|
64 |
ORDER_LIST_LDEK, DATA_TYPES_LDEK = generate_ORDER_LIST_LDEK_and_data_types(sample_data)
|
65 |
LDEK_ACCS = load_json_data(file_path, ORDER_LIST_LDEK)
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
COLUMN_HEADERS_LDEK = ORDER_LIST_LDEK
|
70 |
print(ORDER_LIST_LDEK)
|
71 |
|
@@ -73,11 +73,10 @@ print(ORDER_LIST_LDEK)
|
|
73 |
file_path2 = str(abs_path / "leaderboards/ldek_en_accs.json")
|
74 |
with open(file_path, 'r', encoding='utf-8') as file:
|
75 |
sample_data2 = pd.read_json(file_path).iloc[0].to_dict()
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
# subset=LDEK_ACCS.columns[1:]).format(precision=2)
|
82 |
COLUMN_HEADERS_LDEK_EN = ORDER_LIST_LDEK_EN
|
83 |
print(ORDER_LIST_LDEK_EN)
|
|
|
63 |
|
64 |
ORDER_LIST_LDEK, DATA_TYPES_LDEK = generate_ORDER_LIST_LDEK_and_data_types(sample_data)
|
65 |
LDEK_ACCS = load_json_data(file_path, ORDER_LIST_LDEK)
|
66 |
+
LDEK_ACCS = LDEK_ACCS.style.highlight_max(
|
67 |
+
color = '#ff7070',
|
68 |
+
subset=LDEK_ACCS.columns[1:]).format(precision=2)
|
69 |
COLUMN_HEADERS_LDEK = ORDER_LIST_LDEK
|
70 |
print(ORDER_LIST_LDEK)
|
71 |
|
|
|
73 |
file_path2 = str(abs_path / "leaderboards/ldek_en_accs.json")
|
74 |
with open(file_path, 'r', encoding='utf-8') as file:
|
75 |
sample_data2 = pd.read_json(file_path).iloc[0].to_dict()
|
76 |
+
ORDER_LIST_LDEK_EN, DATA_TYPES_LDEK_EN = generate_ORDER_LIST_LDEK_and_data_types(sample_data2)
|
77 |
+
LDEK_EN_ACCS = load_json_data(file_path2, ORDER_LIST_LDEK_EN)
|
78 |
+
LDEK_ACCS = LDEK_ACCS.style.highlight_max(
|
79 |
+
color = '#E52713',
|
80 |
+
subset=LDEK_ACCS.columns[1:]).format(precision=2)
|
|
|
81 |
COLUMN_HEADERS_LDEK_EN = ORDER_LIST_LDEK_EN
|
82 |
print(ORDER_LIST_LDEK_EN)
|