Spaces:
Sleeping
Sleeping
Update pipeline.py
Browse files- 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
|
| 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)}%"
|