NativeVex commited on
Commit
d75c440
1 Parent(s): 87f6beb

streamlit doesn't handle floats well

Browse files
Files changed (1) hide show
  1. language_models_project/app.py +1 -1
language_models_project/app.py CHANGED
@@ -71,7 +71,7 @@ def infer(text: str) -> List[Dict[str, float]]:
71
  predictions[np.where(probs >= 0.5)] = 1
72
  predictions = pd.Series(predictions == 1)
73
 
74
- l = pd.Series(zip(predictions.tolist(), probs.tolist()))
75
  l.index = [
76
  "toxic",
77
  "severe_toxic",
 
71
  predictions[np.where(probs >= 0.5)] = 1
72
  predictions = pd.Series(predictions == 1)
73
 
74
+ l = pd.Series(zip(predictions.tolist(), probs.tolist())).apply(str)
75
  l.index = [
76
  "toxic",
77
  "severe_toxic",