Update app.py
Browse files
app.py
CHANGED
@@ -1,2 +1,17 @@
|
|
1 |
-
import streamlit as st
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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()
|