Example:

```python
import gradio as gr
from huggingface_hub import WebhooksServer, WebhookPayload  
with gr.Blocks() as ui:
...  
app = WebhooksServer(ui=ui, webhook_secret="my_secret_key")  
@app.add_webhook("/say_hello")
async def hello(payload: WebhookPayload):
return {"message": "hello"}  
app.launch()
```
```