Spaces:
Runtime error
Runtime error
JinHyeong99
commited on
Commit
ยท
8075e7f
1
Parent(s):
58c8c1d
app.py
CHANGED
@@ -50,8 +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 |
-
|
|
|
54 |
|
|
|
55 |
if isinstance(data, bytes):
|
56 |
mode = "wb"
|
57 |
elif isinstance(data, str):
|
@@ -64,7 +66,7 @@ def get_json_file(json_docs):
|
|
64 |
|
65 |
json_loader = JSONLoader(
|
66 |
file_path=temp_filepath,
|
67 |
-
jq_schema=
|
68 |
json_doc = json_loader.load()
|
69 |
return json_doc
|
70 |
|
|
|
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 |
+
# read() ๋ฉ์๋๋ฅผ ์ฌ์ฉํ์ฌ ๋ฐ์ดํฐ ์ฝ๊ธฐ
|
54 |
+
data = json_docs.read()
|
55 |
|
56 |
+
# ๋ฐ์ดํฐ ํ์
์ ๋ฐ๋ผ ์ ์ ํ ๋ชจ๋ ์ ํ
|
57 |
if isinstance(data, bytes):
|
58 |
mode = "wb"
|
59 |
elif isinstance(data, str):
|
|
|
66 |
|
67 |
json_loader = JSONLoader(
|
68 |
file_path=temp_filepath,
|
69 |
+
jq_schema=None)
|
70 |
json_doc = json_loader.load()
|
71 |
return json_doc
|
72 |
|