Skip to main content

streamlit components for image viewer

Project description

Streamlit Image Viewer

Streamlit component for image viewer.

Streamlit App PyPI

Features

  • You can easily view the images in a folder side by side
  • Multiple rows and columns are supported
  • Support for displaying images in multiple rows and columns

Install

pip install streamlit-image-viewer

Example Usage

from glob import glob
from streamlit_image_viewer import image_viewer
import streamlit as st

st.title("ImageViewer App")
st.title("Sample Images")
image_path_list = glob('../../image/*.jpg') + glob('../../image/*.png') 
image_viewer(image_path_list, ncol=3, nrow=2, key="image_viewer")

API

image_viewer(
    image_path_list: List[str],
    ncol: int = 2,
    nrow: int = 2,
    key: Optional[str] = None
)
  • image_path_list : A list containing the paths to the image files
  • ncol : number of columns
  • nrow : number of rows
  • key : An optional string to use as the unique key for the widget. Assign a key so the component is not remount every time the script is rerun.

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamlit_image_viewer-0.1.1.tar.gz (1.3 MB view hashes)

Uploaded Source

Built Distribution

streamlit_image_viewer-0.1.1-py3-none-any.whl (1.3 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page