gbackst commited on
Commit
991026c
1 Parent(s): 910e9a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -2
app.py CHANGED
@@ -1,2 +1,17 @@
1
- import streamlit as st
2
- st.markdown('Hello world!')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import time
3
+ def main():
4
+ st.title("File Upload and Display") # File upload
5
+ uploaded_file = st.file_uploader("Upload a file")
6
+
7
+ if uploaded_file is not None: # Display file contents using st.markdown()
8
+ file_contents = uploaded_file.read().decode("utf-8")
9
+ st.markdown("### File Contents:")
10
+ st.markdown(f"```{file_contents}```")
11
+
12
+ # Wait for 5 seconds
13
+ time.sleep(5) # Show completed message
14
+ st.success("File processing completed!")
15
+
16
+ if __name__ == "__main__":
17
+ main()