Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import random
|
| 3 |
+
|
| 4 |
+
st.set_page_config(page_title="Quote Generator", page_icon="💬")
|
| 5 |
+
|
| 6 |
+
st.title("💬 Simple Quote Generator")
|
| 7 |
+
st.write("Click the button below to get an inspirational quote!")
|
| 8 |
+
|
| 9 |
+
# A small list of sample quotes
|
| 10 |
+
quotes = [
|
| 11 |
+
"The best way to get started is to quit talking and begin doing. — Walt Disney",
|
| 12 |
+
"Don’t let yesterday take up too much of today. — Will Rogers",
|
| 13 |
+
"It’s not whether you get knocked down, it’s whether you get up. — Vince Lombardi",
|
| 14 |
+
"If you are working on something exciting, it will keep you motivated. — Steve Jobs",
|
| 15 |
+
"Success is not in what you have, but who you are. — Bo Bennett",
|
| 16 |
+
"Believe you can and you're halfway there. — Theodore Roosevelt",
|
| 17 |
+
"Keep your face always toward the sunshine—and shadows will fall behind you. — Walt Whitman",
|
| 18 |
+
"Act as if what you do makes a difference. It does. — William James",
|
| 19 |
+
]
|
| 20 |
+
|
| 21 |
+
# Button to generate quote
|
| 22 |
+
if st.button("✨ Generate Quote"):
|
| 23 |
+
quote = random.choice(quotes)
|
| 24 |
+
st.success(quote)
|
| 25 |
+
else:
|
| 26 |
+
st.info("Click the button to see a quote!")
|
| 27 |
+
|
| 28 |
+
# Footer
|
| 29 |
+
st.markdown("---")
|
| 30 |
+
st.caption("Made with ❤️ using Streamlit on Hugging Face Spaces")
|