Spaces:
Sleeping
Sleeping
File size: 1,430 Bytes
643b3a1 75ff8df 643b3a1 41d63c9 df20a13 41d63c9 643b3a1 | 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 52 53 54 55 56 57 58 59 60 61 62 63 | ---
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
|