Spaces:
Sleeping
Sleeping
Commit
·
8906346
1
Parent(s):
1449ce2
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,23 @@
|
|
1 |
-
import streamlit as
|
|
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import time
|
3 |
|
4 |
+
def main():
|
5 |
+
st.title("File Upload Example")
|
6 |
+
|
7 |
+
# File upload section
|
8 |
+
uploaded_file = st.file_uploader("Upload a file")
|
9 |
+
|
10 |
+
if uploaded_file is not None:
|
11 |
+
st.markdown("### Uploaded File Contents:")
|
12 |
+
file_contents = uploaded_file.read().decode("utf-8")
|
13 |
+
st.markdown(file_contents)
|
14 |
+
|
15 |
+
# Wait for 5 seconds
|
16 |
+
with st.spinner("Processing..."):
|
17 |
+
time.sleep(5)
|
18 |
+
|
19 |
+
# Show completed message
|
20 |
+
st.success("Processing completed!")
|
21 |
+
|
22 |
+
if __name__ == "__main__":
|
23 |
+
main()
|