pavankumarvk commited on
Commit
17ffd95
·
verified ·
1 Parent(s): 7f307a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -5
app.py CHANGED
@@ -19,8 +19,8 @@ custom_css = """
19
  }
20
  """
21
 
22
- title="EfficientNetV2 Deepfakes Video Detector"
23
- description="EfficientNetV2 Deepfakes Image Detector by using frame-by-frame detection."
24
 
25
  # Image Interface with larger components
26
  image_interface = gr.Interface(
@@ -44,10 +44,23 @@ video_interface = gr.Interface(
44
  description="Upload a video to detect if it's real or fake (frame-by-frame analysis)"
45
  )
46
 
 
 
 
 
 
 
 
 
 
 
 
47
  app = gr.TabbedInterface(
48
- interface_list=[image_interface, video_interface],
49
- tab_names=['Image inference', 'Video inference'],
50
- css=custom_css
 
 
51
  )
52
 
53
  if __name__ == '__main__':
 
19
  }
20
  """
21
 
22
+ title = "EfficientNetV2 Deepfakes Detector"
23
+ description = "Multimodal Deepfake Detection using EfficientNetV2 (Video/Image) and RawNet (Audio)."
24
 
25
  # Image Interface with larger components
26
  image_interface = gr.Interface(
 
44
  description="Upload a video to detect if it's real or fake (frame-by-frame analysis)"
45
  )
46
 
47
+ # Audio Interface (New)
48
+ audio_interface = gr.Interface(
49
+ fn=pipeline.deepfakes_audio_predict,
50
+ inputs=gr.Audio(sources=["upload", "microphone"], label="Upload Audio", type="numpy"),
51
+ outputs=gr.Textbox(label="Detection Result", lines=8, scale=2),
52
+ # examples=["audio/real_sample.wav", "audio/fake_sample.wav"], # Uncomment if you have example audio files
53
+ cache_examples=False,
54
+ title="Audio Deepfake Detection",
55
+ description="Upload an audio file or record microphone to detect if it's real or fake (Deepfake)"
56
+ )
57
+
58
  app = gr.TabbedInterface(
59
+ interface_list=[image_interface, video_interface, audio_interface],
60
+ tab_names=['Image inference', 'Video inference', 'Audio inference'],
61
+ css=custom_css,
62
+ title=title,
63
+ theme=gr.themes.Soft()
64
  )
65
 
66
  if __name__ == '__main__':