Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
| 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(
|