import gradio as gr import requests # Dictionary of actors, their corresponding video URLs, and image URLs ACTOR_VIDEOS = { "Original": { "video_url": "https://cdn.jsdelivr.net/gh/AI-ANK/bmjoanisawful@main/videos/office.mp4", "image_url": "https://cdn.jsdelivr.net/gh/AI-ANK/bmjoanisawful@main/images/ms.jpg", }, "John Cena": { "video_url": "https://cdn.jsdelivr.net/gh/AI-ANK/bmjoanisawful@main/videos/1jcf.mp4", "image_url": "https://cdn.jsdelivr.net/gh/AI-ANK/bmjoanisawful@main/images/1jc.jpg", }, "Joaquin Phoenix": { "video_url": "https://cdn.jsdelivr.net/gh/AI-ANK/bmjoanisawful@main/videos/1jpf.mp4", "image_url": "https://cdn.jsdelivr.net/gh/AI-ANK/bmjoanisawful@main/images/1jp.jpg", }, "Mr Beast": { "video_url": "https://cdn.jsdelivr.net/gh/AI-ANK/bmjoanisawful@main/videos/1mrbf.mp4", "image_url": "https://cdn.jsdelivr.net/gh/AI-ANK/bmjoanisawful@main/images/1mrb.jpg", }, "Bob Odenkirk": { "video_url": "https://cdn.jsdelivr.net/gh/AI-ANK/bmjoanisawful@main/videos/1sgf.mp4", "image_url": "https://cdn.jsdelivr.net/gh/AI-ANK/bmjoanisawful@main/images/1sg.jpg", }, } # Function to change video based on actor selection def change_video(actor_name): video_url = ACTOR_VIDEOS[actor_name]["video_url"] return f'' # Create Gradio Interface iface = gr.Interface( fn=change_video, inputs=gr.Radio(choices=list(ACTOR_VIDEOS.keys()), label="Choose Your Actor"), outputs=gr.HTML(label="Your Video"), live=True, title="Black Mirror Meets The Office: Michael Scott Is Awful", description="Choose an actor below and watch them step into the shoes of Michael Scott" ) iface.launch()