Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import requests | |
| WEBHOOK_URL = "https://gauthierlmd.app.n8n.cloud/webhook-test/64a72021-7959-4b68-bd20-f569846a3f48" | |
| def send_to_n8n(user_input): | |
| response = requests.post( | |
| WEBHOOK_URL, | |
| json={"text": user_input} | |
| ) | |
| try: | |
| return response.json()["output"] | |
| except: | |
| return "Error: no response" | |
| iface = gr.Interface( | |
| fn=send_to_n8n, | |
| inputs="text", | |
| outputs="text", | |
| title="AI Business Analyzer", | |
| description="Enter business situation to analyze" | |
| ) | |
| iface.launch() |