Marthee commited on
Commit
b65aa40
·
verified ·
1 Parent(s): ef23e5b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -72,9 +72,13 @@ def NBSData():
72
  pdfLink = data.get('filePath')
73
  keyword = data.get('NBS_List')
74
 
 
75
  if not pdfLink or not keyword:
76
  return jsonify({"error": "Both 'pdfLink' and 'keyword' must be provided."}), 400
77
-
 
 
 
78
  print(pdfLink, keyword)
79
 
80
  pdf_document ,tablepdf= Find_Hyperlinking_text.annotate_text_from_pdf([pdfLink], keyword)
 
72
  pdfLink = data.get('filePath')
73
  keyword = data.get('NBS_List')
74
 
75
+ # Checking if both values are provided
76
  if not pdfLink or not keyword:
77
  return jsonify({"error": "Both 'pdfLink' and 'keyword' must be provided."}), 400
78
+
79
+ keyword = eval(keyword) # Convert the string representation of the list to an actual list
80
+
81
+ # Now you can use the extracted pdfLink and keyword
82
  print(pdfLink, keyword)
83
 
84
  pdf_document ,tablepdf= Find_Hyperlinking_text.annotate_text_from_pdf([pdfLink], keyword)