Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- app/draw_diagram.py +1 -1
app/draw_diagram.py
CHANGED
@@ -104,7 +104,7 @@ def draw(folder_name, category_one, category_two, sort, num_sort, model_size_ran
|
|
104 |
chart_data_table = chart_data[['model_show', 'model_link'] + data_columns]
|
105 |
|
106 |
# Format numeric columns to 2 decimal places
|
107 |
-
chart_data_table[chart_data_table.columns[2]] = chart_data_table[chart_data_table.columns[2]].apply(lambda x:
|
108 |
|
109 |
chart_data_table = chart_data_table.sort_values(
|
110 |
by=chart_data_table.columns[2],
|
|
|
104 |
chart_data_table = chart_data[['model_show', 'model_link'] + data_columns]
|
105 |
|
106 |
# Format numeric columns to 2 decimal places
|
107 |
+
chart_data_table[chart_data_table.columns[2]] = chart_data_table[chart_data_table.columns[2]].apply(lambda x: round(float(x), 3) if isinstance(x, (int, float)) else x)
|
108 |
|
109 |
chart_data_table = chart_data_table.sort_values(
|
110 |
by=chart_data_table.columns[2],
|