Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ threshold = config['predct']['threshold']
|
|
| 7 |
|
| 8 |
def predict(text: str):
|
| 9 |
prediction = model(text).item()
|
| 10 |
-
label = "
|
| 11 |
return label, float(prediction)
|
| 12 |
|
| 13 |
examples = [
|
|
|
|
| 7 |
|
| 8 |
def predict(text: str):
|
| 9 |
prediction = model(text).item()
|
| 10 |
+
label = "Токсичный❌" if prediction >= threshold else "Не токсичный✅"
|
| 11 |
return label, float(prediction)
|
| 12 |
|
| 13 |
examples = [
|