Manasa1 commited on
Commit
70f2779
·
verified ·
1 Parent(s): 7a7db48

Rename main.py to app.py

Browse files
Files changed (2) hide show
  1. app.py +25 -0
  2. main.py +0 -2
app.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ # Function to embed the D-ID agent into Gradio
4
+ def embed_did_agent():
5
+ html_code = """
6
+ <script
7
+ type="module"
8
+ src="https://agent.d-id.com/v1/index.js"
9
+ data-name="did-agent"
10
+ data-mode="fabio"
11
+ data-client-key="Z29vZ2xlLW9hdXRoMnwxMDQ5Nzg0NTA5MTE0MTMxMzE0Nzk6T0x2TnRSbVBlWVdyemhxajg1bkp0"
12
+ data-agent-id="agt_yGKAc5pK"
13
+ data-monitor="true">
14
+ </script>
15
+ """
16
+ return html_code
17
+
18
+ # Gradio interface
19
+ with gr.Blocks() as app:
20
+ gr.HTML(embed_did_agent())
21
+
22
+ # Launch the Gradio interface
23
+ app.launch()
24
+
25
+
main.py DELETED
@@ -1,2 +0,0 @@
1
-
2
-