dinhquangson commited on
Commit
e8f0ec0
·
verified ·
1 Parent(s): 274c53e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -122,7 +122,7 @@ async def create_upload_file(text_field: str, file: UploadFile = File(...), ocr:
122
  text = extract_ocr_text_from_pdf(file_path)
123
  else:
124
  text = extract_text_from_pdf(file_path)
125
- obj = {text_field=text,file_path=file_path}
126
  document = Document(content=obj[text_field], meta=obj)
127
  documents.append(document)
128
  else:
 
122
  text = extract_ocr_text_from_pdf(file_path)
123
  else:
124
  text = extract_text_from_pdf(file_path)
125
+ obj = {text_field:text,file_path:file_path}
126
  document = Document(content=obj[text_field], meta=obj)
127
  documents.append(document)
128
  else: