Update app.py
Browse files
app.py
CHANGED
@@ -49,9 +49,11 @@ def get_csv_file(csv_docs):
|
|
49 |
|
50 |
def get_json_file(json_docs):
|
51 |
temp_dir = tempfile.TemporaryDirectory()
|
|
|
|
|
|
|
52 |
json_loader=JSONLoader(
|
53 |
-
temp_filepath
|
54 |
-
with open(temp_filepath, "wb") as f:f.write(csv_docs.getvalue()),
|
55 |
jq_schema='.',
|
56 |
text_content=False,
|
57 |
json_lines=True
|
|
|
49 |
|
50 |
def get_json_file(json_docs):
|
51 |
temp_dir = tempfile.TemporaryDirectory()
|
52 |
+
temp_filepath = os.path.join(temp_dir.name, json_docs.name)
|
53 |
+
with open(temp_filepath, "wb") as f:
|
54 |
+
f.write(csv_docs.getvalue())
|
55 |
json_loader=JSONLoader(
|
56 |
+
temp_filepath,
|
|
|
57 |
jq_schema='.',
|
58 |
text_content=False,
|
59 |
json_lines=True
|