Hi All,
Created a new streamlit component streamlit-imagegrid
to produce selectable image/video grids. The component supports grids that are hetrogeneous and takes tag metadata as well. Check it out.
Hi All,
Created a new streamlit component streamlit-imagegrid
to produce selectable image/video grids. The component supports grids that are hetrogeneous and takes tag metadata as well. Check it out.
Hi Midhun,
Really cool project/plugin!
I had emailed you and also wanted to add those comments here:
Here were some of the issues I’m seeing when trying to add unique metadata + tags for each asset: (If I’m looking at this incorrectly, please let me know)
def imagegrid_test():
# List of image and video URLs
urls_01 = [
{
“src”: “http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4”,
“metadata”: {‘title’:‘video’},
“tags”: {“type”: “video”, “duration”: “1m45s”}
},
{
“src”: ‘https://images.freeimages.com/images/large-previews/56d/peacock-1169961.jpg’,
“metadata”: {‘title’:‘image1’},
“tags”: {“type”: “image”, “duration”: “0”}
},
{
“src”: ‘https://images.freeimages.com/images/large-previews/bc4/curious-bird-1-1374322.jpg’,
“metadata”: {‘title’:‘image2’},
“tags”: {“type”: “image”, “duration”: “0”}
},
{
“src”: ‘https://images.freeimages.com/images/large-previews/9f9/selfridges-2-1470748.jpg’,
“metadata”: {‘title’:‘image3’},
“tags”: {“type”: “image”, “duration”: “0”}
},
{
“src”: ‘http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4’,
“metadata”: {‘title’:‘image4’},
“tags”: {“type”: “image”, “duration”: “0”}
}
] * 2
selected = streamlit_imagegrid("visualization1", urls_01, 3, key='foo')
st.write(f"Selected item: {selected}")
Thanks,
Neil
Hi Neil3,
Thank you for using Streamlit-imagegrid.
For your particular case you can try the following.
{
"src": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4",
"Title" : "Video",
"type": "Video",
"duration": "1m45s"
},
{
"src": "https://images.freeimages.com/images/large-previews/56d/peacock-1169961.jpg",
"Title" : "Video",
"type": "Video",
"duration": "1m45s"
},
{
"src": "https://images.freeimages.com/images/large-previews/bc4/curious-bird-1-1374322.jpg",
"Title" : "Video",
"type": "Video",
"duration": "1m45s"
},
{
"src": "https://images.freeimages.com/images/large-previews/9f9/selfridges-2-1470748.jpg",
"Title" : "Video",
"type": "Video",
"duration": "1m45s"
},
{
"src": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
"Title" : "Video",
"type": "Video",
"duration": "1m45s"
}
All tags other than “src” are displayed as tags. You may manipulate the keys and values.
The above setting gives your something like this
If you have more specific requirements please add a feature request on the github page.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.