tlsgy commited on
Commit
cbe988a
Β·
1 Parent(s): 5d0a58f
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -53,8 +53,8 @@ def get_csv_file(docs):
53
  def get_json_file(docs):
54
  temp_dir = tempfile.TemporaryDirectory() # μž„μ‹œ 디렉토리λ₯Ό μƒμ„±ν•©λ‹ˆλ‹€.
55
  temp_filepath = os.path.join(temp_dir.name, docs.name) # μž„μ‹œ 파일 경둜λ₯Ό μƒμ„±ν•©λ‹ˆλ‹€.
56
- #with open(temp_filepath, "wb") as f: # μž„μ‹œ νŒŒμΌμ„ λ°”μ΄λ„ˆλ¦¬ μ“°κΈ° λͺ¨λ“œλ‘œ μ—½λ‹ˆλ‹€.
57
- # f.write(docs.getvalue())
58
 
59
  loader = JSONLoader(file_path=temp_filepath,
60
  jq_schema='.messages.[].content',
 
53
  def get_json_file(docs):
54
  temp_dir = tempfile.TemporaryDirectory() # μž„μ‹œ 디렉토리λ₯Ό μƒμ„±ν•©λ‹ˆλ‹€.
55
  temp_filepath = os.path.join(temp_dir.name, docs.name) # μž„μ‹œ 파일 경둜λ₯Ό μƒμ„±ν•©λ‹ˆλ‹€.
56
+ with open(temp_filepath, "wb") as f: # μž„μ‹œ νŒŒμΌμ„ λ°”μ΄λ„ˆλ¦¬ μ“°κΈ° λͺ¨λ“œλ‘œ μ—½λ‹ˆλ‹€.
57
+ f.write(docs.getvalue())
58
 
59
  loader = JSONLoader(file_path=temp_filepath,
60
  jq_schema='.messages.[].content',