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