File size: 871 Bytes
d255a76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70f2779
 
aa1a756
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import gradio as gr

# Define a function for user interaction (if needed)
def get_user_input(user_input):
    # Here, you can process the input if necessary
    return f"You said: {user_input}"

# Create the Gradio interface
iface = gr.Interface(
    fn=get_user_input,
    inputs="text",
    outputs="text",
    title="AI Avatar with D-ID",
    description="Interact with your D-ID AI Avatar."
)

# Add HTML for D-ID AI Avatar
avatar_html = """
<div>
    <script
        type="module"
        src="https://agent.d-id.com/v1/index.js"
        data-name="did-agent"
        data-mode="fabio"
        data-client-key="Z29vZ2dlLW9hdXRoMnwxMDE2MjgxNTc0MjI0MDkzMDQ0NzM6eUZROFMxSkRpV01NT2o0MThCQWFB"
        data-agent-id="agt_RqZwS4UC"
        data-monitor="true">
    </script>
</div>
"""

# Launch the Gradio interface with the HTML
iface.launch(share=True, inline=True)