Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -28,18 +28,14 @@ def predict(image):
|
|
| 28 |
avg_pred = (xcp_pred + eff_pred) / 2
|
| 29 |
label = "Real" if avg_pred > 0.5 else "Fake"
|
| 30 |
|
| 31 |
-
|
| 32 |
-
return result, image
|
| 33 |
|
| 34 |
interface = gr.Interface(
|
| 35 |
fn=predict,
|
| 36 |
inputs=gr.Image(type="numpy", label="Upload Image"),
|
| 37 |
-
outputs=
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
],
|
| 41 |
-
title="Deepfake Image Detector (Ensemble: Xception + EfficientNetB4)",
|
| 42 |
-
description="Upload a full image. The model classifies it as real or fake using an ensemble of Xception and EfficientNetB4."
|
| 43 |
)
|
| 44 |
|
| 45 |
interface.launch()
|
|
|
|
| 28 |
avg_pred = (xcp_pred + eff_pred) / 2
|
| 29 |
label = "Real" if avg_pred > 0.5 else "Fake"
|
| 30 |
|
| 31 |
+
return label
|
|
|
|
| 32 |
|
| 33 |
interface = gr.Interface(
|
| 34 |
fn=predict,
|
| 35 |
inputs=gr.Image(type="numpy", label="Upload Image"),
|
| 36 |
+
outputs=gr.Label(label="Prediction"),
|
| 37 |
+
title="Deepfake Image Detector",
|
| 38 |
+
description="Upload a full image. The model classifies it as real or fake."
|
|
|
|
|
|
|
|
|
|
| 39 |
)
|
| 40 |
|
| 41 |
interface.launch()
|