MrFeelgoood commited on
Commit
e062a30
1 Parent(s): 5d57f7a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -204,6 +204,17 @@ def extractor_clean(text, k_words, transformer, question, total_kwords, return_t
204
  return values, return_text
205
 
206
 
 
 
 
 
 
 
 
 
 
 
 
207
 
208
  def pdf_ocr(file):
209
  # Convert PDF to image
 
204
  return values, return_text
205
 
206
 
207
+ def format_output(extracted_values):
208
+ output = {}
209
+ values_output = "\n".join([f"mq. {value}" for value in extracted_values[0]])
210
+ output["Mq. Values"] = values_output
211
+ output["Total"] = extracted_values[1]
212
+ if extracted_values[2]:
213
+ output["Ref. Text"] = extracted_values[2]
214
+ return output
215
+
216
+
217
+
218
 
219
  def pdf_ocr(file):
220
  # Convert PDF to image