File size: 1,394 Bytes
7099c03
869f05a
 
7099c03
 
 
 
 
 
869f05a
7099c03
 
869f05a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
620ebd7
 
 
 
 
 
 
 
869f05a
 
620ebd7
869f05a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
title: DeepfakeDetection
emoji: 🕵️
colorFrom: purple
colorTo: blue
sdk: gradio
sdk_version: 6.9.0
app_file: app.py
pinned: false
short_description: Deepfake detection demo for image, video and audio.
---

# Deepfake Detection Demo

Gradio playground for the Dataspike deepfake REST API (image / video / audio).

## Space setup

The app calls `https://api.dataspike.io` with the `ds-api-token` header, read from
the `API_KEY` environment variable. On Hugging Face, add it under
**Settings → Variables and secrets → New secret**:

- name: `API_KEY`
- value: the Dataspike API token

Without that secret the API returns 401 and every tab shows a `Failure` verdict.

## Run locally

    pip install -r requirements.txt
    API_KEY=<api-token> python app.py

Open the printed localhost URL. Tabs:

- **Image** — synchronous analysis.
- **Video** — upload + job polling until completion.
- **Audio** — upload + job polling until completion.

## Presets

Each upload field offers ready-made examples from `presets/`, covering the
supported KYC scenarios: selfie-style faces as genuine, AI-generated or
manipulated media, plus genuine and synthesised voice. The Image and Video tabs
also show a [Lucide ScanFace](https://lucide.dev/icons/scan-face) hint that the
input must contain a clearly visible human face.

## Tests

    pip install -r requirements.txt pytest httpx
    pytest