Spaces:
Runtime error
Runtime error
Update InitialMarkups.py
Browse files- InitialMarkups.py +2 -6
InitialMarkups.py
CHANGED
|
@@ -1078,13 +1078,9 @@ def extract_section_under_header(multiplePDF_Paths):
|
|
| 1078 |
dbPath = '/TSA JOBS/ADR Test/FIND/'
|
| 1079 |
jsonCombined=[]
|
| 1080 |
for i in range(len(arrayofPDFS)):
|
| 1081 |
-
singlepdf=arrayofPDFS[i]
|
| 1082 |
-
|
| 1083 |
-
metadata = dbxTeam.sharing_get_shared_link_metadata(singlepdf)
|
| 1084 |
-
pdf_bytes = BytesIO()
|
| 1085 |
-
docHighlights.save(pdf_bytes)
|
| 1086 |
pdflink = tsadropboxretrieval.uploadanyFile(doc=docarray[i], path=dbPath, pdfname=filenames[i])
|
| 1087 |
-
|
|
|
|
| 1088 |
jsonCombined.extend(json_output1)
|
| 1089 |
combined_json_str = json.dumps(jsonCombined, indent=1)
|
| 1090 |
return pdf_bytes.getvalue(), docHighlights , combined_json_str
|
|
|
|
| 1078 |
dbPath = '/TSA JOBS/ADR Test/FIND/'
|
| 1079 |
jsonCombined=[]
|
| 1080 |
for i in range(len(arrayofPDFS)):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1081 |
pdflink = tsadropboxretrieval.uploadanyFile(doc=docarray[i], path=dbPath, pdfname=filenames[i])
|
| 1082 |
+
json_input = copy.deepcopy(jsons[i]) # make a deep copy
|
| 1083 |
+
json_output1 = changepdflinks(json_input, pdflink)
|
| 1084 |
jsonCombined.extend(json_output1)
|
| 1085 |
combined_json_str = json.dumps(jsonCombined, indent=1)
|
| 1086 |
return pdf_bytes.getvalue(), docHighlights , combined_json_str
|