Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -226,10 +226,10 @@ def findapiFilteredHeadings():
|
|
| 226 |
print(pdfLink)
|
| 227 |
listofheadings = data.get('listofheadings') #in json format
|
| 228 |
print(listofheadings)
|
| 229 |
-
pdfbytes, pdf_document,tablepdfoutput= InitialMarkups.extract_section_under_headerRawan(pdfLink,listofheadings)
|
| 230 |
global jsonoutput
|
| 231 |
jsonoutput=tablepdfoutput
|
| 232 |
-
return jsonify(
|
| 233 |
except Exception as e:
|
| 234 |
return jsonify({"error": str(e)}), 500
|
| 235 |
|
|
@@ -248,10 +248,10 @@ def findapi():
|
|
| 248 |
data = request.get_json()
|
| 249 |
# Extracting values
|
| 250 |
pdfLink = data.get('filePath')
|
| 251 |
-
pdfbytes, pdf_document,tablepdfoutput
|
| 252 |
global jsonoutput
|
| 253 |
jsonoutput=tablepdfoutput
|
| 254 |
-
return jsonify(
|
| 255 |
except Exception as e:
|
| 256 |
return jsonify({"error": str(e)}), 500
|
| 257 |
|
|
|
|
| 226 |
print(pdfLink)
|
| 227 |
listofheadings = data.get('listofheadings') #in json format
|
| 228 |
print(listofheadings)
|
| 229 |
+
pdfbytes, pdf_document,tablepdfoutput,alltext= InitialMarkups.extract_section_under_headerRawan(pdfLink,listofheadings)
|
| 230 |
global jsonoutput
|
| 231 |
jsonoutput=tablepdfoutput
|
| 232 |
+
return jsonify(alltext)
|
| 233 |
except Exception as e:
|
| 234 |
return jsonify({"error": str(e)}), 500
|
| 235 |
|
|
|
|
| 248 |
data = request.get_json()
|
| 249 |
# Extracting values
|
| 250 |
pdfLink = data.get('filePath')
|
| 251 |
+
pdfbytes, pdf_document,tablepdfoutput= InitialMarkups.extract_section_under_header(pdfLink)
|
| 252 |
global jsonoutput
|
| 253 |
jsonoutput=tablepdfoutput
|
| 254 |
+
return jsonify(tablepdfoutput)
|
| 255 |
except Exception as e:
|
| 256 |
return jsonify({"error": str(e)}), 500
|
| 257 |
|