clboetticher's picture
clboetticher HF staff
Upload app.py
b420f7b verified
raw
history blame contribute delete
372 Bytes
# https://huggingface.co/docs/huggingface_hub/main/en/guides/webhooks_server
# app.py
from huggingface_hub import webhook_endpoint, WebhookPayload
@webhook_endpoint
async def trigger_training(payload: WebhookPayload) -> None:
if payload.repo.type == "dataset" and payload.event.action == "update":
# Trigger a training job if a dataset is updated
...