Marthee commited on
Commit
abee04b
·
verified ·
1 Parent(s): a852e6b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -44,8 +44,9 @@ def download_pdf():
44
  print("Extracted PDF Link:", pdf_link)
45
  print("Extracted Keywords:", keyword)
46
  createDF=False
47
- outputDone = Find_Hyperlinking_text.annotate_text_from_pdf([pdf_link], keyword)[0]
48
-
 
49
 
50
  pdf_bytes = BytesIO(pdf_content)
51
  return send_file(
 
44
  print("Extracted PDF Link:", pdf_link)
45
  print("Extracted Keywords:", keyword)
46
  createDF=False
47
+ pdf_content = Find_Hyperlinking_text.annotate_text_from_pdf([pdf_link], keyword)[0]
48
+ if pdf_content is None:
49
+ return "PDF content not found.", 404
50
 
51
  pdf_bytes = BytesIO(pdf_content)
52
  return send_file(