Spaces:
Sleeping
Sleeping
Update app.py
Browse filestest file made with ChatGPT
app.py
CHANGED
|
@@ -1,3 +1,24 @@
|
|
| 1 |
import streamlit as st
|
|
|
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
+
import time
|
| 3 |
|
| 4 |
+
def main():
|
| 5 |
+
st.title("Simple Streamlit Program")
|
| 6 |
+
|
| 7 |
+
# Wait for 5 seconds
|
| 8 |
+
with st.spinner("Waiting for 5 seconds..."):
|
| 9 |
+
time.sleep(5)
|
| 10 |
+
|
| 11 |
+
# Show completed message
|
| 12 |
+
st.success("Task completed!")
|
| 13 |
+
|
| 14 |
+
# File upload feature
|
| 15 |
+
st.header("File Upload")
|
| 16 |
+
uploaded_file = st.file_uploader("Choose a file")
|
| 17 |
+
|
| 18 |
+
if uploaded_file is not None:
|
| 19 |
+
file_contents = uploaded_file.read()
|
| 20 |
+
st.markdown("### File Contents:")
|
| 21 |
+
st.markdown(f"```{file_contents.decode()}```")
|
| 22 |
+
|
| 23 |
+
if __name__ == "__main__":
|
| 24 |
+
main()
|