Ramzan0553 commited on
Commit
2b09641
·
verified ·
1 Parent(s): d247be8

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -0
app.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ # Define your ElevenLabs agent URL
4
+ agent_url = "https://elevenlabs.io/app/talk-to?agent_id=EERV7uoyRL7PKvGFYuX7"
5
+
6
+ # Function to return a clickable HTML link
7
+ def get_call_link():
8
+ return f"""
9
+ <p style="font-size:18px;">Click the button below to talk to the AI Agent:</p>
10
+ <a href="{agent_url}" target="_blank">
11
+ <button style="padding:10px 20px; font-size:18px; background-color:#007bff; color:white; border:none; border-radius:5px;">
12
+ Start Call
13
+ </button>
14
+ </a>"""
15
+
16
+ with gr.Blocks() as app:
17
+ gr.Markdown("## 🤖 Talk to AI Agent")
18
+ call_btn = gr.Button("Show Call Link")
19
+ html_output = gr.HTML()
20
+ call_btn.click(fn=get_call_link, outputs=html_output)
21
+
22
+ app.launch(server_name="0.0.0.0", server_port=7860)