truens66 commited on
Commit
2311f2b
·
verified ·
1 Parent(s): 1fae05e

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +1 -1
pipeline.py CHANGED
@@ -36,7 +36,7 @@ def deepfakes_image_predict(input_image):
36
  pred = model.predict(np.expand_dims(face2, axis=0))[0]
37
  real, fake = pred[0], pred[1]
38
 
39
- if real > 0.5:
40
  text = f"The image is REAL. \n Deepfakes Confidence: {round(100 - (real * 100), 3)}%"
41
  else:
42
  text = f"The image is FAKE. \n Deepfakes Confidence: {round(fake * 100, 3)}%"
 
36
  pred = model.predict(np.expand_dims(face2, axis=0))[0]
37
  real, fake = pred[0], pred[1]
38
 
39
+ if real < 0.45:
40
  text = f"The image is REAL. \n Deepfakes Confidence: {round(100 - (real * 100), 3)}%"
41
  else:
42
  text = f"The image is FAKE. \n Deepfakes Confidence: {round(fake * 100, 3)}%"