Marthee commited on
Commit
22ceafd
·
verified ·
1 Parent(s): 16c35c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -327,7 +327,7 @@ def findapitobebilledonlymarthe():
327
  pdfLink = data.get('filePath')
328
  if not pdfLink:
329
  return jsonify({"error": "Missing 'filePath'"}), 400
330
- pdfbytes, pdf_document, tablepdfoutput, alltext , filename= InitialMarkups.extract_section_under_header_tobebilled2marthe(pdfLink)
331
  # return jsonify(tablepdfoutput)
332
  # Parse JSON string → list of dicts
333
  data = json.loads(tablepdfoutput)
@@ -353,7 +353,7 @@ def findapitobebilledonlymarthe():
353
  <!DOCTYPE html>
354
  <html>
355
  <head>
356
- <title>{filename}</title>
357
  <meta charset="utf-8">
358
  </head>
359
  <body>
@@ -362,7 +362,7 @@ def findapitobebilledonlymarthe():
362
  </html>
363
  """
364
  # return Response(html_content, mimetype="text/html", headers={"Filename": filename})
365
- return jsonify({"input_data": html_content,"Filename:":filename})
366
  # return Response(html_content, mimetype="text/html", headers={"Filename": filename})
367
  except Exception as e:
368
  print(f"Error in /findapitobebilledonly: {e}")
 
327
  pdfLink = data.get('filePath')
328
  if not pdfLink:
329
  return jsonify({"error": "Missing 'filePath'"}), 400
330
+ pdfbytes, pdf_document, tablepdfoutput, alltext , filenames= InitialMarkups.extract_section_under_header_tobebilled2marthe(pdfLink)
331
  # return jsonify(tablepdfoutput)
332
  # Parse JSON string → list of dicts
333
  data = json.loads(tablepdfoutput)
 
353
  <!DOCTYPE html>
354
  <html>
355
  <head>
356
+ <title>{filenames}</title>
357
  <meta charset="utf-8">
358
  </head>
359
  <body>
 
362
  </html>
363
  """
364
  # return Response(html_content, mimetype="text/html", headers={"Filename": filename})
365
+ return jsonify({"input_data": html_content,"Filename:":filenames})
366
  # return Response(html_content, mimetype="text/html", headers={"Filename": filename})
367
  except Exception as e:
368
  print(f"Error in /findapitobebilledonly: {e}")