Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,11 +26,11 @@ def get_thought_of_the_day()-> str:
|
|
| 26 |
"""
|
| 27 |
try:
|
| 28 |
# Fetch a random inspirational quote
|
| 29 |
-
|
| 30 |
|
| 31 |
# The package returns a dictionary with 'quote' and 'author'
|
| 32 |
-
text =
|
| 33 |
-
author =
|
| 34 |
|
| 35 |
return f"💡 Thought of the Day:\n\"{text}\" — {author}"
|
| 36 |
|
|
|
|
| 26 |
"""
|
| 27 |
try:
|
| 28 |
# Fetch a random inspirational quote
|
| 29 |
+
quote_str = inspirational_quotes.quote()
|
| 30 |
|
| 31 |
# The package returns a dictionary with 'quote' and 'author'
|
| 32 |
+
text = quote_str.get("quote", "Stay positive and keep learning!")
|
| 33 |
+
author = quote_str.get("author", "Unknown")
|
| 34 |
|
| 35 |
return f"💡 Thought of the Day:\n\"{text}\" — {author}"
|
| 36 |
|