Spaces:
Sleeping
Sleeping
Nick Starkov commited on
Commit ·
f71032d
1
Parent(s): a6ca712
Changed dataset. Removed category
Browse files
app.py
CHANGED
|
@@ -18,5 +18,5 @@ async def get_random_quotes():
|
|
| 18 |
# Sample 50 random quotes
|
| 19 |
random_quotes = quotes_df.sample(n=50, random_state=random.randint(1, 100000))
|
| 20 |
# Convert to list of dictionaries for JSON response
|
| 21 |
-
quotes_list = random_quotes[["quote", "author"
|
| 22 |
return {"quotes": quotes_list}
|
|
|
|
| 18 |
# Sample 50 random quotes
|
| 19 |
random_quotes = quotes_df.sample(n=50, random_state=random.randint(1, 100000))
|
| 20 |
# Convert to list of dictionaries for JSON response
|
| 21 |
+
quotes_list = random_quotes[["quote", "author"]].to_dict(orient="records")
|
| 22 |
return {"quotes": quotes_list}
|