Matty-Sam commited on
Commit
cc19c7b
·
verified ·
1 Parent(s): 54f926f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 = 5
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