Spaces:
Runtime error
Runtime error
JinHyeong99
commited on
Commit
Β·
13ddfae
1
Parent(s):
01993a1
app.py
CHANGED
@@ -50,7 +50,10 @@ def get_csv_file(csv_docs):
|
|
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 |
-
json_loader = JSONLoader(
|
|
|
|
|
|
|
54 |
json_doc = json_loader.load(temp_filepath)
|
55 |
return json_doc
|
56 |
|
|
|
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 |
+
json_loader = JSONLoader(
|
54 |
+
file_path = temp_filepath,
|
55 |
+
jq_schema='.messages[]'
|
56 |
+
)
|
57 |
json_doc = json_loader.load(temp_filepath)
|
58 |
return json_doc
|
59 |
|