dcavadia commited on
Commit
febc5cc
·
verified ·
1 Parent(s): 98b29fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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
- # Provide a fresh DataFrame for BarPlot resets (component expects a DataFrame) [3]
24
- return pd.DataFrame({"item": CLASSES, "probability": * len(CLASSES)}) # [3]
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