Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -81,7 +81,7 @@ def NBSData():
|
|
| 81 |
# Now you can use the extracted pdfLink and keyword
|
| 82 |
print(pdfLink, keyword)
|
| 83 |
|
| 84 |
-
pdf_document
|
| 85 |
dbxTeam= tsadropboxretrieval.ADR_Access_DropboxTeam('user')
|
| 86 |
|
| 87 |
# Get metadata using the shared link
|
|
@@ -89,10 +89,10 @@ def NBSData():
|
|
| 89 |
dbPath='/TSA JOBS/ADR Test/FIND/'
|
| 90 |
pdflink= tsadropboxretrieval.uploadanyFile(doc=pdf_document,path=dbPath,pdfname=metadata.name) #doc=doc,pdfname=path,pdfpath=pdfpath+'Measured Plan/
|
| 91 |
print('LINKS0',pdflink)
|
| 92 |
-
dbPath='/TSA JOBS/ADR Test/FIND/'
|
| 93 |
-
tablepdfLink=tsadropboxretrieval.uploadanyFile(doc=tablepdf,path=dbPath,pdfname=metadata.name+' Markup Summary')
|
| 94 |
-
print(f"PDF successfully uploaded to Dropbox at")
|
| 95 |
-
print('LINKS1',tablepdfLink)
|
| 96 |
return jsonify({
|
| 97 |
"message": "PDF processed successfully.",
|
| 98 |
"download_link": 'done'
|
|
|
|
| 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
|
|
|
|
| 89 |
dbPath='/TSA JOBS/ADR Test/FIND/'
|
| 90 |
pdflink= tsadropboxretrieval.uploadanyFile(doc=pdf_document,path=dbPath,pdfname=metadata.name) #doc=doc,pdfname=path,pdfpath=pdfpath+'Measured Plan/
|
| 91 |
print('LINKS0',pdflink)
|
| 92 |
+
# dbPath='/TSA JOBS/ADR Test/FIND/'
|
| 93 |
+
# tablepdfLink=tsadropboxretrieval.uploadanyFile(doc=tablepdf,path=dbPath,pdfname=metadata.name+' Markup Summary')
|
| 94 |
+
# print(f"PDF successfully uploaded to Dropbox at")
|
| 95 |
+
# print('LINKS1',tablepdfLink)
|
| 96 |
return jsonify({
|
| 97 |
"message": "PDF processed successfully.",
|
| 98 |
"download_link": 'done'
|