Spaces:
Sleeping
Sleeping
dinhquangson
commited on
Update app.py
Browse files
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
|
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:
|