Spaces:
Runtime error
Runtime error
Zack Zhiyuan Li
commited on
Commit
·
05c75c8
1
Parent(s):
116bc60
change category
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def update_table(category):
|
|
21 |
api_model_data = {
|
22 |
"Model": [item["model_id"] for item in ranking_data],
|
23 |
"Votes": [item["votes"] for item in ranking_data],
|
24 |
-
"Categories": [category] * len(ranking_data)
|
25 |
}
|
26 |
api_df = pd.DataFrame(api_model_data)
|
27 |
else:
|
|
|
21 |
api_model_data = {
|
22 |
"Model": [item["model_id"] for item in ranking_data],
|
23 |
"Votes": [item["votes"] for item in ranking_data],
|
24 |
+
"Categories": [item["categories"] for item in ranking_data] if category == "all" else [category] * len(ranking_data)
|
25 |
}
|
26 |
api_df = pd.DataFrame(api_model_data)
|
27 |
else:
|