DDingcheol commited on
Commit
ef9ba64
·
1 Parent(s): 72eb9e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -50,8 +50,7 @@ def get_json_file(json_docs):
50
  temp_dir = tempfile.TemporaryDirectory()
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.read()) # 파일의 내용을 쓰기 위해 read()를 사용합니다.
54
-
55
  json_loader = JSONLoader(file_path=temp_filepath)
56
  json_doc = json_loader.load()
57
  return json_doc
 
50
  temp_dir = tempfile.TemporaryDirectory()
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())
 
54
  json_loader = JSONLoader(file_path=temp_filepath)
55
  json_doc = json_loader.load()
56
  return json_doc