Spaces:
Running
Running
michal
commited on
Commit
·
4ffd60b
1
Parent(s):
4711c0b
Udate
Browse files- app.py +14 -8
- src/structures/pes_structure.py +2 -3
app.py
CHANGED
@@ -68,14 +68,20 @@ with main:
|
|
68 |
value=ORDER_LIST,
|
69 |
)
|
70 |
# Dataframe component to display the leaderboard data
|
71 |
-
data_component = gr.components.Dataframe(
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
)
|
80 |
def update_dataframe(selected_columns):
|
81 |
return filter_columns(selected_columns)
|
|
|
68 |
value=ORDER_LIST,
|
69 |
)
|
70 |
# Dataframe component to display the leaderboard data
|
71 |
+
# data_component = gr.components.Dataframe(
|
72 |
+
# value=PES_ACCS,
|
73 |
+
# headers=COLUMN_HEADERS,
|
74 |
+
# type="pandas",
|
75 |
+
# datatype=DATA_TYPES,
|
76 |
+
# interactive=False,
|
77 |
+
# visible=True,
|
78 |
+
# # column_widths=[400] + [250] * (len(COLUMN_HEADERS) - 1)
|
79 |
+
# )
|
80 |
+
data_component = gr.HTML(value=PES_ACCS.to_html())
|
81 |
+
columns_selector.change(
|
82 |
+
filter_columns,
|
83 |
+
inputs=columns_selector,
|
84 |
+
outputs=data_component
|
85 |
)
|
86 |
def update_dataframe(selected_columns):
|
87 |
return filter_columns(selected_columns)
|
src/structures/pes_structure.py
CHANGED
@@ -41,9 +41,8 @@ def filter_columns(column_choices):
|
|
41 |
styled_df = PES_ACCS[selected_columns].style.highlight_max(
|
42 |
color=highlight_color, subset=selected_columns[1:]
|
43 |
)
|
44 |
-
# Convert
|
45 |
-
|
46 |
-
return plain_df # Return unstyled DataFrame
|
47 |
|
48 |
|
49 |
def load_json_data(file_path, order_list):
|
|
|
41 |
styled_df = PES_ACCS[selected_columns].style.highlight_max(
|
42 |
color=highlight_color, subset=selected_columns[1:]
|
43 |
)
|
44 |
+
# Convert to HTML
|
45 |
+
return styled_df.to_html()
|
|
|
46 |
|
47 |
|
48 |
def load_json_data(file_path, order_list):
|