Spaces:
Runtime error
Runtime error
JinHyeong99
commited on
Commit
Β·
7ec593e
1
Parent(s):
5e62047
app.py
CHANGED
@@ -48,15 +48,13 @@ def get_csv_file(csv_docs):
|
|
48 |
|
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(json_docs.getvalue())
|
55 |
json_loader = JSONLoader(
|
56 |
file_path = temp_filepath,
|
57 |
-
jq_schema=
|
58 |
-
text_content=False
|
59 |
-
)
|
60 |
json_doc = json_loader.load()
|
61 |
return json_doc
|
62 |
|
|
|
48 |
|
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(json_docs.getvalue())
|
55 |
json_loader = JSONLoader(
|
56 |
file_path = temp_filepath,
|
57 |
+
jq_schema=None)
|
|
|
|
|
58 |
json_doc = json_loader.load()
|
59 |
return json_doc
|
60 |
|