Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,7 +44,7 @@ def search_for_books(author: str) -> list[dict[str,str]]:
|
|
| 44 |
List of dictionaries. Each list item is a book and dictionaries have keys 'title', 'authors', 'subjects', and 'summaries'
|
| 45 |
"""
|
| 46 |
|
| 47 |
-
max_pages =
|
| 48 |
counter = 1
|
| 49 |
try:
|
| 50 |
params = {"search": author}
|
|
@@ -62,7 +62,7 @@ def search_for_books(author: str) -> list[dict[str,str]]:
|
|
| 62 |
'title': book['title'],
|
| 63 |
'authors': book['authors'],
|
| 64 |
'subjects': book['subjects'],
|
| 65 |
-
'summaries': book['summaries']
|
| 66 |
}
|
| 67 |
results.append(book_info)
|
| 68 |
|
|
|
|
| 44 |
List of dictionaries. Each list item is a book and dictionaries have keys 'title', 'authors', 'subjects', and 'summaries'
|
| 45 |
"""
|
| 46 |
|
| 47 |
+
max_pages = 2
|
| 48 |
counter = 1
|
| 49 |
try:
|
| 50 |
params = {"search": author}
|
|
|
|
| 62 |
'title': book['title'],
|
| 63 |
'authors': book['authors'],
|
| 64 |
'subjects': book['subjects'],
|
| 65 |
+
'summaries': [summary[:500] for summary in book['summaries']]
|
| 66 |
}
|
| 67 |
results.append(book_info)
|
| 68 |
|