pcr12 commited on
Commit
b1a4c97
·
verified ·
1 Parent(s): f035364

fix: add scikit-learn==1.8.0, add clf debug logging

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -160,6 +160,7 @@ async def score(
160
  emb_np = embedding.detach().numpy() # (1, 768)
161
  predicted_vertical = str(clf.predict(emb_np)[0])
162
  proba = clf.predict_proba(emb_np)[0]
 
163
  vertical_confidence = round(float(proba.max()), 2)
164
  else:
165
  predicted_vertical = vertical or "other"
 
160
  emb_np = embedding.detach().numpy() # (1, 768)
161
  predicted_vertical = str(clf.predict(emb_np)[0])
162
  proba = clf.predict_proba(emb_np)[0]
163
+ print(f"[clf] proba={proba} predicted={predicted_vertical} conf={proba.max()}", flush=True)
164
  vertical_confidence = round(float(proba.max()), 2)
165
  else:
166
  predicted_vertical = vertical or "other"