webhook / simple.py
Wauplin's picture
Wauplin HF staff
example
dfcff08
raw history blame
No virus
300 Bytes
from gradio_webhooks import GradioWebhookApp, WebhookPayload
app = GradioWebhookApp(webhook_secret="my_dummy_secret")
@app.add_webhook("/my_webhook")
async def hello(payload: WebhookPayload):
print(f"Received webhook for repo {payload.repo.name}")
return {"processed": True}
app.ready()