codingcoolfun9ed commited on
Commit
53b725a
·
verified ·
1 Parent(s): c733944

change threshold again again again

Browse files
Files changed (1) hide show
  1. 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.6
106
  confidence = max(fakeProb, realProb)
107
  prediction = "fake" if isFake else "real"
108
 
109
- if confidence < 0.6:
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)