Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -48,7 +48,7 @@ if st.button("Generate Poster", key="main_gen_poster"):
|
|
| 48 |
# -----------------
|
| 49 |
elif quote_type == "Author" and user_input.strip():
|
| 50 |
try:
|
| 51 |
-
url = f"https://api.
|
| 52 |
res = requests.get(url)
|
| 53 |
data = res.json()
|
| 54 |
|
|
@@ -66,7 +66,7 @@ if st.button("Generate Poster", key="main_gen_poster"):
|
|
| 66 |
# -----------------
|
| 67 |
elif quote_type == "Topic" and user_input.strip():
|
| 68 |
try:
|
| 69 |
-
url = f"https://api.
|
| 70 |
res = requests.get(url)
|
| 71 |
data = res.json()
|
| 72 |
|
|
|
|
| 48 |
# -----------------
|
| 49 |
elif quote_type == "Author" and user_input.strip():
|
| 50 |
try:
|
| 51 |
+
url = f"https://quotable-api.fly.dev/quotes?author={user_input.strip().replace(' ', '%20')}"
|
| 52 |
res = requests.get(url)
|
| 53 |
data = res.json()
|
| 54 |
|
|
|
|
| 66 |
# -----------------
|
| 67 |
elif quote_type == "Topic" and user_input.strip():
|
| 68 |
try:
|
| 69 |
+
url = f"https://quotable-api.fly.dev/quotes?tags={user_input.strip().lower()}"
|
| 70 |
res = requests.get(url)
|
| 71 |
data = res.json()
|
| 72 |
|