Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,8 +20,8 @@ with open("dat.json", "r", encoding="utf-8") as f:
|
|
| 20 |
CLASSES = list(data) # ordered list of class names [1]
|
| 21 |
|
| 22 |
def empty_df():
|
| 23 |
-
#
|
| 24 |
-
return pd.DataFrame({"item": CLASSES, "probability":
|
| 25 |
|
| 26 |
# ----------------------------
|
| 27 |
# Utils
|
|
|
|
| 20 |
CLASSES = list(data) # ordered list of class names [1]
|
| 21 |
|
| 22 |
def empty_df():
|
| 23 |
+
# FIX: build zeros list via * len(CLASSES) instead of a starred expression in dict value [1]
|
| 24 |
+
return pd.DataFrame({"item": CLASSES, "probability": [0] * len(CLASSES)}) # [3]
|
| 25 |
|
| 26 |
# ----------------------------
|
| 27 |
# Utils
|