Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -74,16 +74,19 @@ def predict(image):
|
|
| 74 |
|
| 75 |
return "\n".join(results), output_image
|
| 76 |
|
|
|
|
|
|
|
| 77 |
# Gradio Interface
|
| 78 |
interface = gr.Interface(
|
| 79 |
fn=predict,
|
| 80 |
-
inputs=gr.Image(type="
|
| 81 |
outputs=[
|
| 82 |
gr.Textbox(label="Predictions"),
|
| 83 |
gr.Image(type="numpy", label="Annotated Image"),
|
| 84 |
],
|
| 85 |
title="Deepfake Detector (Multi-Face Ensemble)",
|
| 86 |
description="Detects all faces in an image and classifies each one as real or fake using Xception and EfficientNetB4 ensemble.",
|
|
|
|
| 87 |
)
|
| 88 |
|
| 89 |
interface.launch()
|
|
|
|
| 74 |
|
| 75 |
return "\n".join(results), output_image
|
| 76 |
|
| 77 |
+
|
| 78 |
+
|
| 79 |
# Gradio Interface
|
| 80 |
interface = gr.Interface(
|
| 81 |
fn=predict,
|
| 82 |
+
inputs=gr.Image(type="filepath", label="Upload Image"), # ✅ EDITED
|
| 83 |
outputs=[
|
| 84 |
gr.Textbox(label="Predictions"),
|
| 85 |
gr.Image(type="numpy", label="Annotated Image"),
|
| 86 |
],
|
| 87 |
title="Deepfake Detector (Multi-Face Ensemble)",
|
| 88 |
description="Detects all faces in an image and classifies each one as real or fake using Xception and EfficientNetB4 ensemble.",
|
| 89 |
+
api_name="/predict" # ✅ ADDED
|
| 90 |
)
|
| 91 |
|
| 92 |
interface.launch()
|