A newer version of the Gradio SDK is available:
5.34.1
title: MCP Hackathon Deepfake Watchdog
emoji: π‘οΈ
colorFrom: green
colorTo: gray
sdk: gradio
sdk_version: 5.33.1
app_file: app.py
pinned: false
license: mit
short_description: Upload your image and/or voice to scan for deepfake misuse o
π‘οΈ Deepfake Watchdog π€
π·οΈ Tags: mcp-server-track
agent-demo-track
A multimodal AI agent that detects deepfake content using face, voice, and video verification. Built with π§ DeepFace, π£οΈ SpeechBrain, π₯ OpenCV, and accelerated with βοΈ Modal for serverless GPU-powered execution. Designed for the MCP HuggingFace's Hackathon.
π Features
- π§β𦱠Face Verification: Compare two faces and detect if they belong to the same person using DeepFace.
- ποΈ Voice Verification: Determine if two audio samples are from the same speaker with SpeechBrain.
- ποΈ Video Scan for Deepfakes: Scan a video (or YouTube link) and match all faces against a reference image.
- π PDF Report: Generate a downloadable report with all scan results.
- π§ Runs as an MCP Agent: Compatible with Gradio MCP, fully pluggable into agentic workflows.
- β‘ Modal Offloading: GPU-backed execution for DeepFace & SpeechBrain using Modal.
π§± Architecture
Gradio UI ββ> MCP Agent ββ> Modal Functions ββ> verify_faces_remote() ββ> verify_voices_remote() ββ> verify_faces_in_video_remote()
π§© Tech Stack
Tool | Purpose |
---|---|
Gradio |
Frontend UI + MCP integration |
Modal |
GPU offloading for ML workloads |
DeepFace |
Face verification |
SpeechBrain |
Voice verification |
OpenCV |
Video processing |
Pillow |
Image manipulation |
TensorFlow |
Required by DeepFace |
FFmpeg |
(Optional) for YouTube downloads |
π οΈ Setup Instructions
1. Clone the repo
git clone https://huggingface.co/spaces/abetavarez/MCP-Hackathon-Deepfake-Watchdog
cd MCP-Hackathon-Deepfake-Watchdog
2. Create .env
cp .env.example .env
# Add your API keys or configs if required
3. Install dependencies (locally)
pip install -r requirements.txt
4. Run the app (with MCP)
modal run app.py
or for development::
python app.py
βοΈ Modal Setup
The app uses a single modal_app/backend.py file that defines:
verify_faces_remote
verify_voices_remote
verify_faces_in_video_remote
Each function is GPU-accelerated and runs independently on demand.
modal deploy modal_app.py
π§ Agent MCP Integration
This app runs as an MCP server using:
demo.launch(mcp_server=True)
You can use this tool in your LlamaIndex, Hugging Face or LangChain agent as a remote service.
π Hackathon Tracks β Track 1: MCP Tool β Turned into a reusable tool with mcp_server=True β Track 3: Agentic Demo β A fully capable AI agent for deepfake detection (LlamaIndex) β Modal β Offloaded heavy tasks to Modalβs GPU cloud
π§± Folder Structure
. βββ app.py # Main app entry point (Gradio + MCP) βββ llama_agent.py # LlamaIndex Agent implementation βββ tools.py # Tools for LlamaIndex Agent and MCP βββ modal_app/ β βββ backend.py # Modal remote functions βββ detector/ β βββ face.py # Local face verification logic β βββ voice.py # Local voice verification logic β βββ video.py # Local video scan logic βββ reports/ β βββ pdf_report.py # PDF report generation βββ utils/ β βββ youtube_utils.py # YouTube download helper βββ README.md βββ requirements.txt βββ .env.example
##π§βπ» Author Abraham Efren Tavarez GitHub - @AbeTavarez LinkedIn β @abrahametavarez
β¨ Future Improvements
Add S3-compatible cloud storage or video ingest
Add Nebius S3 support for video uploads
Add RAG-based evidence summarizer
Enable auto-scan via background agent
Add QR code for mobile voice capture