Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,13 @@ def get_csv_file(csv_docs):
|
|
48 |
return csv_doc
|
49 |
|
50 |
def get_json_file(json_docs):
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
|
54 |
# λ¬Έμλ€μ μ²λ¦¬νμ¬ ν
μ€νΈ μ²ν¬λ‘ λλλ ν¨μμ
λλ€.
|
|
|
48 |
return csv_doc
|
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(temp_filepath, jq_schema={})
|
56 |
+
users_text = json_loader.load()
|
57 |
+
return users_text
|
58 |
|
59 |
|
60 |
# λ¬Έμλ€μ μ²λ¦¬νμ¬ ν
μ€νΈ μ²ν¬λ‘ λλλ ν¨μμ
λλ€.
|