Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -25,17 +25,19 @@ ACTOR_VIDEOS = {
|
|
25 |
},
|
26 |
}
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
return f"
|
32 |
|
|
|
33 |
iface = gr.Interface(
|
34 |
-
fn=
|
35 |
-
inputs=gr.
|
36 |
-
outputs="
|
37 |
-
live=True
|
|
|
|
|
38 |
)
|
39 |
|
40 |
-
iface.launch()
|
41 |
-
|
|
|
25 |
},
|
26 |
}
|
27 |
|
28 |
+
# Function to change video based on actor selection
|
29 |
+
def change_video(actor_name):
|
30 |
+
video_url = ACTOR_VIDEOS[actor_name]["video_url"]
|
31 |
+
return f'<video width="100%" controls autoplay><source src="{video_url}" type="video/mp4"></video>'
|
32 |
|
33 |
+
# Create Gradio Interface
|
34 |
iface = gr.Interface(
|
35 |
+
fn=change_video,
|
36 |
+
inputs=gr.Radio(choices=list(ACTOR_VIDEOS.keys()), label="Choose Your Actor"),
|
37 |
+
outputs=gr.HTML(label="Your Video"),
|
38 |
+
live=True,
|
39 |
+
title="Black Mirror Meets The Office: Michael Scott Is Awful",
|
40 |
+
description="Choose an actor below and watch them step into the shoes of Michael Scott"
|
41 |
)
|
42 |
|
43 |
+
iface.launch()
|
|