JinHyeong99 commited on
Commit
13ddfae
Β·
1 Parent(s): 01993a1
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -50,7 +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
- json_loader = JSONLoader(temp_filepath)
 
 
 
54
  json_doc = json_loader.load(temp_filepath)
55
  return json_doc
56
 
 
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
+ json_loader = JSONLoader(
54
+ file_path = temp_filepath,
55
+ jq_schema='.messages[]'
56
+ )
57
  json_doc = json_loader.load(temp_filepath)
58
  return json_doc
59