Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| # Define your ElevenLabs agent URL | |
| agent_url = "https://elevenlabs.io/app/talk-to?agent_id=EERV7uoyRL7PKvGFYuX7" | |
| # Function to return a clickable HTML link | |
| def get_call_link(): | |
| return f""" | |
| <p style="font-size:18px;">Click the button below to talk to the AI Agent:</p> | |
| <a href="{agent_url}" target="_blank"> | |
| <button style="padding:10px 20px; font-size:18px; background-color:#007bff; color:white; border:none; border-radius:5px;"> | |
| Start Call | |
| </button> | |
| </a>""" | |
| with gr.Blocks() as app: | |
| gr.Markdown("## 🤖 Talk to AI Agent") | |
| call_btn = gr.Button("Show Call Link") | |
| html_output = gr.HTML() | |
| call_btn.click(fn=get_call_link, outputs=html_output) | |
| app.launch(server_name="0.0.0.0", server_port=7860) |