anikameshetty commited on
Commit
dfecafb
·
verified ·
1 Parent(s): 5ae9c3c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -22,12 +22,12 @@ def search_books(ques, max_givenbooks = 5):
22
  )
23
  matched_books = books[text_be].head(max_givenbooks)
24
  if matched_books.empty:
25
- return "No exact matches found in the catalog for this description"
26
- results_in = "Available books in our catalog matching your request:\n"
27
  for idx, row in matched_books.iterrows():
28
- results_in += f" - **Title** : {row['Title']} | **Author** : {row['Author']} | **Genre** : {row['Genre']} | **Age** : {row['Age_Range']}/n"
29
- results_in += f" *Description* : {row['Description']}\n\n"
30
- return results_in
31
  def respond(message, history):
32
  catalog_info = search_books(message)
33
 
 
22
  )
23
  matched_books = books[text_be].head(max_givenbooks)
24
  if matched_books.empty:
25
+ return "No exact matches found in the catalog for this description."
26
+ results_str = "Available books in our catalog matching your request:\n"
27
  for idx, row in matched_books.iterrows():
28
+ results_str += f" - **Title** : {row['Title']} | **Author** : {row['Author']} | **Genre** : {row['Genre']} | **Age** : {row['Age_Range']}/n"
29
+ results_str += f" *Description* : {row['Description']}\n\n"
30
+ return results_str
31
  def respond(message, history):
32
  catalog_info = search_books(message)
33