Spaces:
Sleeping
Sleeping
import streamlit as st | |
import time | |
def main(): | |
st.title("Simple Streamlit Program") | |
# Wait for 5 seconds | |
with st.spinner("Waiting for 5 seconds..."): | |
time.sleep(5) | |
# Show completed message | |
st.success("Task completed!") | |
# File upload feature | |
st.header("File Upload") | |
uploaded_file = st.file_uploader("Choose a file") | |
if uploaded_file is not None: | |
file_contents = uploaded_file.read() | |
st.markdown("### File Contents:") | |
st.markdown(f"```{file_contents.decode()}```") | |
if __name__ == "__main__": | |
main() |