Spaces:
Running
Running
File size: 486 Bytes
5b9c451 437b5da 4d687dc 701e4dd 5b9c451 5c17da4 5b9c451 437b5da 5b9c451 4d687dc 5b9c451 545e110 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import gradio as gr
# get_video() returns the file path to sample videos included with Gradio
from gradio.media import get_video, MEDIA_PATHS
demo = gr.Interface(
fn=lambda x: x,
inputs=gr.Video(),
outputs=gr.Video(),
examples=[
[get_video("world.mp4")],
[get_video("a.mp4")],
[get_video("b.mp4")],
],
api_name="predict",
cache_examples=True
)
if __name__ == "__main__":
demo.launch(allowed_paths=[str(p) for p in MEDIA_PATHS])
|