ryoung41 commited on
Commit
a34f3f5
·
1 Parent(s): ccfa9a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +39 -1
app.py CHANGED
@@ -1,3 +1,41 @@
1
  import streamlit as st
 
2
 
3
- st.markdown('Hello World')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
+ import time
3
 
4
+
5
+ def main():
6
+
7
+ st.title("File Upload and Display")
8
+
9
+ # File upload
10
+
11
+ uploaded_file = st.file_uploader("Upload a file")
12
+
13
+
14
+
15
+ if uploaded_file is not None:
16
+
17
+ # Display file contents using st.markdown()
18
+
19
+ file_contents = uploaded_file.read().decode("utf-8")
20
+
21
+ st.markdown("### File Contents:")
22
+
23
+ st.markdown(f"```{file_contents}```")
24
+
25
+
26
+
27
+ # Wait for 5 seconds
28
+
29
+ time.sleep(5)
30
+
31
+
32
+
33
+ # Show completed message
34
+
35
+ st.success("File processing completed!")
36
+
37
+
38
+
39
+ if __name__ == "__main__":
40
+
41
+ main()