Yunique's picture
Update app.py
1c771cf
raw
history blame contribute delete
567 Bytes
import streamlit as st
import time
def main():
st.title("File Uploader")
# File uploader
uploaded_file = st.file_uploader("Upload a file")
if uploaded_file is not None:
# Display file contents using st.markdown()
file_contents = uploaded_file.read().decode("utf-8")
st.markdown("### File Contents:")
st.markdown(f"```{file_contents}```")
# Wait for 5 seconds
time.sleep(5)
# Display completed message
st.success("File processing completed!")
if __name__ == "__main__":
main()