Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -35,7 +35,7 @@ def get_json_file(docs):
|
|
35 |
temp_filepath = os.path.join(temp_dir.name, docs.name)
|
36 |
with open(temp_filepath, "wb") as f: # ์์ ํ์ผ์ ๋ฐ์ด๋๋ฆฌ ์ฐ๊ธฐ ๋ชจ๋๋ก ์ฝ๋๋ค.
|
37 |
f.write(docs.getvalue())
|
38 |
-
loader = JSONLoader(temp_filepath,'.messages[].content', text_content=False)
|
39 |
data = loader.load()
|
40 |
return data
|
41 |
|
|
|
35 |
temp_filepath = os.path.join(temp_dir.name, docs.name)
|
36 |
with open(temp_filepath, "wb") as f: # ์์ ํ์ผ์ ๋ฐ์ด๋๋ฆฌ ์ฐ๊ธฐ ๋ชจ๋๋ก ์ฝ๋๋ค.
|
37 |
f.write(docs.getvalue())
|
38 |
+
loader = JSONLoader(file_path = temp_filepath, jq_schema ='.messages[].content', text_content=False)
|
39 |
data = loader.load()
|
40 |
return data
|
41 |
|