Marthee commited on
Commit
6b5154d
·
verified ·
1 Parent(s): 4b4a5a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -44,7 +44,7 @@ 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)
48
  if pdf_content is None:
49
  return "PDF content not found.", 404
50
 
@@ -81,7 +81,7 @@ def NBSData():
81
  # Now you can use the extracted pdfLink and keyword
82
  print(pdfLink, keyword)
83
 
84
- pdf_document = Find_Hyperlinking_text.annotate_text_from_pdf([pdfLink], keyword)
85
  dbxTeam= tsadropboxretrieval.ADR_Access_DropboxTeam('user')
86
 
87
  # Get metadata using the shared link
@@ -94,7 +94,7 @@ def NBSData():
94
  # print(f"PDF successfully uploaded to Dropbox at")
95
  # print('LINKS1',tablepdfLink)
96
  return jsonify({
97
- "message": "PDF processed successfully.",
98
  "download_link": pdflink
99
  })
100
 
 
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
  if pdf_content is None:
49
  return "PDF content not found.", 404
50
 
 
81
  # Now you can use the extracted pdfLink and keyword
82
  print(pdfLink, keyword)
83
 
84
+ pdf_document ,df= Find_Hyperlinking_text.annotate_text_from_pdf([pdfLink], keyword)
85
  dbxTeam= tsadropboxretrieval.ADR_Access_DropboxTeam('user')
86
 
87
  # Get metadata using the shared link
 
94
  # print(f"PDF successfully uploaded to Dropbox at")
95
  # print('LINKS1',tablepdfLink)
96
  return jsonify({
97
+ "message": df,
98
  "download_link": pdflink
99
  })
100