File Uploader
Display a file uploader widget.
python
data = st.file_uploader("Upload a CSV")
Camera input
Display a widget that allows users to upload images directly a camera.
python
image = st.camera_input("Take a picture")
Color picker
Display a color picker widget.
python
color = st.color_picker("Pick a color")
Media elements
Image
Display an image or list of images.
python
st.image(numpy_array)
st.image(image_bytes)
st.image(file)
st.image("https://example.com/myimage.jpg")
Audio
Display an audio player.
python
st.audio(numpy_array)
st.audio(audio_bytes)
st.audio(file)
st.audio("https://example.com/myaudio.mp3", format="audio/mp3")
Video
Display a video player.
python
st.video(numpy_array)
st.video(video_bytes)
st.video(file)
st.video("https://example.com/myvideo.mp4", format="video/mp4")
