|
import streamlit as st |
|
from PIL import Image |
|
import time |
|
|
|
|
|
st.title("Streamlit Testing App") |
|
|
|
|
|
st.write("This app tests various Streamlit elements like file uploader, image display, and audio playback.") |
|
|
|
|
|
uploaded_file = st.file_uploader("Upload an image", type=["png", "jpg", "jpeg"]) |
|
|
|
if uploaded_file is not None: |
|
|
|
image = Image.open(uploaded_file) |
|
st.image(image, caption="Uploaded Image", use_container_width=True) |
|
|
|
|
|
st.write("Playing audio...") |
|
with st.spinner("Loading audio..."): |
|
time.sleep(2) |
|
st.audio("kids_playing_audio.wav") |