bimahasto/antispoofing-ockd
0
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
Local Gradio UI
This folder contains a Gradio demo (app_gradio.py) and a small entrypoint app.py that launches it. The demo scans available trained models (folders under implementasi_new/code/models/ and single .pt files under deploy/antispoofing-ockd/models/).
Quick steps to run locally (Windows PowerShell):
- Create and activate a Python 3.8+ environment and install requirements:
python -m venv .venv; .\.venv\Scripts\Activate.ps1; pip install -r requirements.txt- Start the Gradio UI:
python app.py- The UI will open in your browser (default port 7861). Select a model from the dropdown, upload one
.wavfile, pick a scenario (1/2/3), and click Run. The UI returns a single numeric score and a label ("bonafide"/"spoof").
Notes on Hugging Face Spaces:
- This project is Gradio-based and can be deployed to Hugging Face Spaces. The repo already contains an
app.pyentrypoint andrequirements.txt— Spaces will runapp.pyby default. You may need to pin exact versions for reproducibility. - Keep in mind: Spaces has resource limits (CPU/RAM) and may not support a large PyTorch GPU workload. For CPU-based demo it should work; for GPU you'd need a paid GPU-enabled space.
