mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-06 10:25:17 +08:00
a23bc03aeb
* improve is playing, remove console error * add video demo to all_demos * fix demo * fix bug * changelog + notebooks * cleanup * fix choppy video resizing * reduce flashing due to prediction request, video loading + rendering * fix notebooks * changelog
23 lines
450 B
Python
23 lines
450 B
Python
import gradio as gr
|
|
import os
|
|
|
|
|
|
a = os.path.join(os.path.dirname(__file__), "files/world.mp4") # Video
|
|
b = os.path.join(os.path.dirname(__file__), "files/a.mp4") # Video
|
|
c = os.path.join(os.path.dirname(__file__), "files/b.mp4") # Video
|
|
|
|
|
|
demo = gr.Interface(
|
|
fn=lambda x: x,
|
|
inputs=gr.Video(type="file"),
|
|
outputs=gr.Video(),
|
|
examples=[
|
|
[a],
|
|
[b],
|
|
[c],
|
|
],
|
|
)
|
|
|
|
if __name__ == "__main__":
|
|
demo.launch()
|