Spaces:
Sleeping
Sleeping
| title: Webhook Processing | |
| emoji: π | |
| colorFrom: gray | |
| colorTo: blue | |
| sdk: gradio | |
| sdk_version: 5.9.1 | |
| app_file: app.py | |
| pinned: false | |
| # HuggingFace Webhook Processor | |
| A Gradio Space that receives and processes HuggingFace Hub webhooks, storing them for later analysis. | |
| ## Features | |
| - β Receives HuggingFace Hub webhooks via `/webhooks/hub` endpoint | |
| - β Filters webhooks by scope (`repo` and `repo.content` only) | |
| - β Stores webhook payloads in memory | |
| - β Automatically batches and saves to dataset every 100 messages | |
| - β Saves as efficient parquet files for easy querying | |
| - β Real-time status dashboard | |
| ## Webhook Setup | |
| Configure your HuggingFace Hub webhooks to point to: | |
| ``` | |
| https://[your-space-name].hf.space/webhooks/hub | |
| ``` | |
| ## Dataset Output | |
| Webhooks are saved to: `assafvayner/webhook-messages` | |
| Each batch is saved as a separate parquet file with: | |
| - Timestamp | |
| - Event type | |
| - Scope | |
| - Full JSON payload | |
| ## Environment Variables | |
| Requires `HF_TOKEN` with write access to the dataset repository. | |
| ## API Endpoints | |
| - `POST /webhooks/hub` - Receive webhooks | |
| - `GET /webhooks/health` - Health check and stats | |
| ## Local Development | |
| ```bash | |
| python -m venv venv | |
| source venv/bin/activate # or `venv\Scripts\activate` on Windows | |
| pip install -r requirements.txt | |
| export HF_TOKEN=your_token_here | |
| python app.py | |
| ``` | |
| Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference | |