Update app.py
Browse files
app.py
CHANGED
|
@@ -52,8 +52,7 @@ def get_json_file(json_docs):
|
|
| 52 |
json_loader=JSONLoader(
|
| 53 |
temp_filepath=os.path.join(temp_dir.name, pdf_docs.name),
|
| 54 |
jq_schema='.',
|
| 55 |
-
text_content=False
|
| 56 |
-
json_lines=True
|
| 57 |
)
|
| 58 |
with open(temp_filepath,'wb') as f:
|
| 59 |
s = f.write(json_docs.getvalue())
|
|
@@ -62,7 +61,6 @@ def get_json_file(json_docs):
|
|
| 62 |
s = s.replace(',}','}')
|
| 63 |
s = s.replace(',]',']')
|
| 64 |
json_doc = json_loader.load()
|
| 65 |
-
# json_doc = json_loader.load()
|
| 66 |
return json_doc
|
| 67 |
|
| 68 |
|
|
|
|
| 52 |
json_loader=JSONLoader(
|
| 53 |
temp_filepath=os.path.join(temp_dir.name, pdf_docs.name),
|
| 54 |
jq_schema='.',
|
| 55 |
+
text_content=False
|
|
|
|
| 56 |
)
|
| 57 |
with open(temp_filepath,'wb') as f:
|
| 58 |
s = f.write(json_docs.getvalue())
|
|
|
|
| 61 |
s = s.replace(',}','}')
|
| 62 |
s = s.replace(',]',']')
|
| 63 |
json_doc = json_loader.load()
|
|
|
|
| 64 |
return json_doc
|
| 65 |
|
| 66 |
|