Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -235,6 +235,25 @@ def findapiFilteredHeadings():
|
|
| 235 |
|
| 236 |
|
| 237 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 238 |
################################################################################################################################################################
|
| 239 |
################################################################################################################################################################
|
| 240 |
##################### For Rawan - MC Connection ###########################################################################################################
|
|
|
|
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
+
@app.route('/findapiAllDocNoNotbilled', methods=['GET','POST'])
|
| 239 |
+
def findapiFilteredHeadings():
|
| 240 |
+
try:
|
| 241 |
+
print('In process [Try]')
|
| 242 |
+
data = request.get_json()
|
| 243 |
+
# Extracting values
|
| 244 |
+
pdfLink = data.get('filePath')
|
| 245 |
+
print(pdfLink)
|
| 246 |
+
# listofheadings = data.get('listofheadings') #in json format
|
| 247 |
+
print(listofheadings)
|
| 248 |
+
pdfbytes, pdf_document,tablepdfoutput,alltext= InitialMarkups.extract_section_under_header_FullDoc_WithoutNotBilled(pdfLink)
|
| 249 |
+
global jsonoutput
|
| 250 |
+
jsonoutput=tablepdfoutput
|
| 251 |
+
return jsonify(alltext)
|
| 252 |
+
except Exception as e:
|
| 253 |
+
return jsonify({"error": str(e)}), 500
|
| 254 |
+
|
| 255 |
+
|
| 256 |
+
|
| 257 |
################################################################################################################################################################
|
| 258 |
################################################################################################################################################################
|
| 259 |
##################### For Rawan - MC Connection ###########################################################################################################
|