webhook / simple.py
Wauplin's picture
Wauplin HF Staff
refacto + add example
d9c353a
raw
history blame
268 Bytes
from gradio_webhooks import GradioWebhookApp, WebhookPayload
app = GradioWebhookApp()
@app.add_webhook("/my_webhook")
async def hello(payload: WebhookPayload):
print(f"Received webhook for repo {payload.repo.name}")
return {"processed": True}
app.ready()