File size: 527 Bytes
aa96a63
6f8fb25
aa96a63
6f8fb25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import streamlit as st
import time

def main():
    st.title("File Upload and Display")

    # File upload section
    uploaded_file = st.file_uploader("Upload a file")

    if uploaded_file is not None:
        # Read the contents of the file
        file_contents = uploaded_file.read()

        # Display the contents using st.markdown()
        st.markdown(file_contents)

    # Wait for 5 seconds
    time.sleep(5)

    # Show completed message
    st.write("File upload completed!")

if __name__ == "__main__":
    main()