webhook-processing / README.md
assafvayner's picture
assafvayner HF Staff
Downgrade to Gradio 5 for stability
75ff8df

A newer version of the Gradio SDK is available: 6.6.0

Upgrade
metadata
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

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