Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import requests | |
| WEBHOOK_URL = "https://swannetrx15.app.n8n.cloud/webhook/ai-analyst" | |
| def call_n8n(subscribers): | |
| response = requests.post( | |
| WEBHOOK_URL, | |
| json={"subscribers": subscribers} | |
| ) | |
| return response.json()["result"] | |
| interface = gr.Interface( | |
| fn=call_n8n, | |
| inputs=gr.Number(label="Number of Subscribers (in millions)"), | |
| outputs=gr.Textbox(label="Output"), | |
| title="Prime Video Revenue Calculator", | |
| description="Estimate revenue using n8n workflow" | |
| ) | |
| interface.launch() |