Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
#
|
4 |
def get_user_input(user_input):
|
5 |
-
# Here, you can process the input if necessary
|
6 |
return f"You said: {user_input}"
|
7 |
|
8 |
# Create the Gradio interface
|
@@ -14,7 +13,7 @@ iface = gr.Interface(
|
|
14 |
description="Interact with your D-ID AI Avatar."
|
15 |
)
|
16 |
|
17 |
-
#
|
18 |
avatar_html = """
|
19 |
<div>
|
20 |
<script
|
@@ -22,15 +21,19 @@ avatar_html = """
|
|
22 |
src="https://agent.d-id.com/v1/index.js"
|
23 |
data-name="did-agent"
|
24 |
data-mode="fabio"
|
25 |
-
data-client-key="
|
26 |
data-agent-id="agt_RqZwS4UC"
|
27 |
data-monitor="true">
|
28 |
</script>
|
29 |
</div>
|
30 |
"""
|
31 |
|
32 |
-
#
|
33 |
-
iface.
|
|
|
|
|
|
|
|
|
34 |
|
35 |
|
36 |
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
# Function to return a simple message
|
4 |
def get_user_input(user_input):
|
|
|
5 |
return f"You said: {user_input}"
|
6 |
|
7 |
# Create the Gradio interface
|
|
|
13 |
description="Interact with your D-ID AI Avatar."
|
14 |
)
|
15 |
|
16 |
+
# HTML for D-ID AI Avatar
|
17 |
avatar_html = """
|
18 |
<div>
|
19 |
<script
|
|
|
21 |
src="https://agent.d-id.com/v1/index.js"
|
22 |
data-name="did-agent"
|
23 |
data-mode="fabio"
|
24 |
+
data-client-key="Z29vZ2xlLW9hdXRoMnwxMDE2MjgxNTc0MjI0MDkzMDQ0NzM6eUZROFMxSkRpV01NT2o0MThCQWFB"
|
25 |
data-agent-id="agt_RqZwS4UC"
|
26 |
data-monitor="true">
|
27 |
</script>
|
28 |
</div>
|
29 |
"""
|
30 |
|
31 |
+
# Add the HTML component to the interface
|
32 |
+
iface.add_component(gr.HTML(avatar_html))
|
33 |
+
|
34 |
+
# Launch the Gradio interface
|
35 |
+
iface.launch(share=True)
|
36 |
+
|
37 |
|
38 |
|
39 |
|