kyrilloswahid commited on
Commit
84927b1
·
verified ·
1 Parent(s): 57d98ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -79,15 +79,14 @@ def predict(image):
79
  # Gradio Interface
80
  interface = gr.Interface(
81
  fn=predict,
82
- inputs=gr.Image(type="filepath", label="Upload Image"),
83
  outputs=[
84
  gr.Textbox(label="Predictions"),
85
- gr.Image(type="filepath", 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"
90
  )
91
 
92
- if __name__ == "__main__":
93
- interface.launch()
 
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()