Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -51,7 +51,7 @@ def get_json_file(json_docs):
|
|
51 |
temp_filepath = os.path.join(temp_dir.name, json_docs.name) # ์์ ํ์ผ ๊ฒฝ๋ก๋ฅผ ์์ฑํฉ๋๋ค.
|
52 |
with open(temp_filepath, "wb") as f: # ์์ ํ์ผ์ ๋ฐ์ด๋๋ฆฌ ์ฐ๊ธฐ ๋ชจ๋๋ก ์ฝ๋๋ค.
|
53 |
f.write(json_docs.getvalue()) # json ๋ฌธ์์ ๋ด์ฉ์ ์์ ํ์ผ์ ์๋๋ค.
|
54 |
-
json_loader = JSONLoader(temp_filepath, jq_schema='.
|
55 |
json_doc = json_loader.load() # ํ
์คํธ๋ฅผ ์ถ์ถํฉ๋๋ค.
|
56 |
return json_doc # ์ถ์ถํ ํ
์คํธ๋ฅผ ๋ฐํํฉ๋๋ค.
|
57 |
|
|
|
51 |
temp_filepath = os.path.join(temp_dir.name, json_docs.name) # ์์ ํ์ผ ๊ฒฝ๋ก๋ฅผ ์์ฑํฉ๋๋ค.
|
52 |
with open(temp_filepath, "wb") as f: # ์์ ํ์ผ์ ๋ฐ์ด๋๋ฆฌ ์ฐ๊ธฐ ๋ชจ๋๋ก ์ฝ๋๋ค.
|
53 |
f.write(json_docs.getvalue()) # json ๋ฌธ์์ ๋ด์ฉ์ ์์ ํ์ผ์ ์๋๋ค.
|
54 |
+
json_loader = JSONLoader(temp_filepath, jq_schema='.', text_content=False) # Loader๋ฅผ ์ฌ์ฉํด json๋ฅผ ๋ก๋ํฉ๋๋ค.
|
55 |
json_doc = json_loader.load() # ํ
์คํธ๋ฅผ ์ถ์ถํฉ๋๋ค.
|
56 |
return json_doc # ์ถ์ถํ ํ
์คํธ๋ฅผ ๋ฐํํฉ๋๋ค.
|
57 |
|