Spaces:
Runtime error
Runtime error
File size: 860 Bytes
d255a76 69286f4 d255a76 69286f4 d255a76 69286f4 d255a76 69286f4 8b9e285 69286f4 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 38 39 40 |
import gradio as gr
# Function to return a simple message
def get_user_input(user_input):
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."
)
# 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="Z29vZ2xlLW9hdXRoMnwxMDE2MjgxNTc0MjI0MDkzMDQ0NzM6eUZROFMxSkRpV01NT2o0MThCQWFB"
data-agent-id="agt_RqZwS4UC"
data-monitor="true">
</script>
</div>
"""
# Add the HTML component to the interface
iface.add_component(gr.HTML(avatar_html))
# Launch the Gradio interface
iface.launch(share=True)
|