Spaces:
Runtime error
Runtime error
streamlit doesn't handle floats well
Browse files
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",
|