File size: 666 Bytes
231a75b
838164d
231a75b
 
d5bec4e
231a75b
 
88c7481
231a75b
 
a64acd3
231a75b
 
12f54ee
231a75b
87e9456
4dac278
87e9456
12f54ee
87e9456
45a6dfa
87e9456
d5bec4e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import huggingface_spaces as hfs

# Create a space.
space = hfs.create_space("my-space")

# Install the `ffmpeg-input` module in the space.
space.install_package("ffmpeg-input")

# Upload the video file to the space.
space.upload_file("/path/to/NEARHUBanimation.mp4")

# Transcode the video file.
space.run_script("transcode_video.py")

# Launch a gradio interface that allows you to play the transcoded video file.
demo = gr.Interface(transcode_video, 
                    gr.components.Video(), 
                    "playable_video", 
                    examples=video_files, 
                    cache_examples=True)

if __name__ == "__main__":
    demo.launch()