change threshold again again again
Browse files- api/predict.py +2 -2
api/predict.py
CHANGED
|
@@ -102,11 +102,11 @@ def predict_review(text):
|
|
| 102 |
fakeProb = avgProbs[1]
|
| 103 |
realProb = avgProbs[0]
|
| 104 |
|
| 105 |
-
isFake = fakeProb > 0.
|
| 106 |
confidence = max(fakeProb, realProb)
|
| 107 |
prediction = "fake" if isFake else "real"
|
| 108 |
|
| 109 |
-
if confidence < 0.
|
| 110 |
prediction = "uncertain"
|
| 111 |
|
| 112 |
lengthCat = getLengthCategory(cleaned)
|
|
|
|
| 102 |
fakeProb = avgProbs[1]
|
| 103 |
realProb = avgProbs[0]
|
| 104 |
|
| 105 |
+
isFake = fakeProb > 0.75
|
| 106 |
confidence = max(fakeProb, realProb)
|
| 107 |
prediction = "fake" if isFake else "real"
|
| 108 |
|
| 109 |
+
if confidence < 0.75:
|
| 110 |
prediction = "uncertain"
|
| 111 |
|
| 112 |
lengthCat = getLengthCategory(cleaned)
|