pavankumarvk commited on
Commit
2697855
·
verified ·
1 Parent(s): 2f2e598

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +4 -1
pipeline.py CHANGED
@@ -143,10 +143,13 @@ def deepfakes_image_predict(input_image):
143
  face2 = faces / 255.0
144
  pred = model.predict(np.expand_dims(face2, axis=0))[0]
145
  real, fake = pred[0], pred[1]
 
146
  if real > 0.5:
147
  text2 = "The image is REAL. \n Deepfakes Confidence: " + str(round(100 - (real * 100), 3)) + "%"
148
  else:
149
- text2 = "The image is FAKE. \n Deepfakes Confidence: " + str(round(fake * 100), 3)) + "%"
 
 
150
  return text2
151
 
152
  # ---------------------------------------------------------
 
143
  face2 = faces / 255.0
144
  pred = model.predict(np.expand_dims(face2, axis=0))[0]
145
  real, fake = pred[0], pred[1]
146
+
147
  if real > 0.5:
148
  text2 = "The image is REAL. \n Deepfakes Confidence: " + str(round(100 - (real * 100), 3)) + "%"
149
  else:
150
+ # Fixed the parenthesis placement here
151
+ text2 = "The image is FAKE. \n Deepfakes Confidence: " + str(round(fake * 100, 3)) + "%"
152
+
153
  return text2
154
 
155
  # ---------------------------------------------------------