soumeyak commited on
Commit
5f02ace
1 Parent(s): 74ee802

Update app.py

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