gradio
gradio copied to clipboard
Video Gallery Outputs
[*] I have searched to see if a similar issue already exists. YES
Is your feature request related to a problem? Please describe.
NO
Describe the solution you'd like
I'd like to be able to display a list of videos outputs as a Gallery, that would work as the images gallery works, but for videos.
Additional context
Context: I made a PySceneDetect demo that can divide a video sequence into every shots it can detect.
Link: Scene Edit Detection on HuggingFace
I use the gr.List
instead, and display an image Gallery for every first frame of each shot.
Hey @fffiloni! We've now made it possible for Gradio users to create their own custom components -- meaning that you can write some Python and JavaScript (Svelte), and publish it as a Gradio component. You can use it in your own Gradio apps, or share it so that anyone can use it in their Gradio apps. Here are some examples of custom Gradio components:
- A "Rich Textbox" that allows you to write bold/italics/colored text
- A "Folium Map Viewer" component that allows you to use interactive maps
You can see the source code for those components by clicking the "Files" icon and then clicking "src". The complete source code for the backend and frontend is visible. In particular, its very fast if you want to build off an existing component. We've put together a Guide: https://www.gradio.app/guides/five-minute-guide, and we're happy to help if you'd like to put together a custom component for this issue
@fffiloni I published a video_gallery
component using our new custom component workflow. Feel free to try it out (https://pypi.org/project/gradio-videogallery/)
@abidlabs After seeing how much thumbs up the original issue has, maybe we should add this functionality to core.
Instead of adding a new component, could we modify Gallery
to accept images or videos or a combination?
@abidlabs yeah for sure, wasn't clear but that's what I meant.
Let's do it
yay 🎉
I dropped a simple space to demonstrate the video gallery component, but as you can experiment here, it seems there is a conflict with the File component i use to drop some videos.
—› File component won't upload my files :( —› deactivating the videogallery component let the File input component work properly
there's no logs *
Let's do it
is the gr.Gallery() already supporting videos?
is the gr.Gallery() already supporting videos?
Seems not supported yet