kyrilloswahid commited on
Commit
42a7306
·
verified ·
1 Parent(s): 97fb682

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -79,14 +79,15 @@ def predict(image):
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="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" # ✅ ADDED
90
  )
91
 
92
- interface.launch()
 
 
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="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"
90
  )
91
 
92
+ if __name__ == "__main__":
93
+ interface.launch()