Moonjunho commited on
Commit
dd76972
โ€ข
1 Parent(s): db22eca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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