EUNSEO56 commited on
Commit
6a9e5d9
·
1 Parent(s): 369f5ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -39,7 +39,7 @@ def get_text_file(text_docs):
39
 
40
  def get_csv_file(csv_docs):
41
  temp_dir3 = tempfile.TemporaryDirectory() # 임시 디렉토리를 생성합니다.
42
- temp_filepath3 = os.path.join(temp_dir.name, csv_docs.name) # 임시 파일 경로를 생성합니다.
43
  with open(temp_filepath3, "wb") as f: # 임시 파일을 바이너리 쓰기 모드로 엽니다.
44
  f.write(csv_docs.getvalue()) # PDF 문서의 내용을 임시 파일에 씁니다.
45
  csv_loader = CSVLoader(temp_filepath3) # PyPDFLoader를 사용해 PDF를 로드합니다.
@@ -48,7 +48,7 @@ def get_csv_file(csv_docs):
48
 
49
  def get_json_file(json_docs):
50
  temp_dir4 = tempfile.TemporaryDirectory() # 임시 디렉토리를 생성합니다.
51
- temp_filepath4 = os.path.join(temp_dir.name, json_docs.name) # 임시 파일 경로를 생성합니다.
52
  with open(temp_filepath4, "wb") as f: # 임시 파일을 바이너리 쓰기 모드로 엽니다.
53
  f.write(json_docs.getvalue()) # PDF 문서의 내용을 임시 파일에 씁니다.
54
  json_loader = JSONLoader(temp_filepath4) # PyPDFLoader를 사용해 PDF를 로드합니다.
 
39
 
40
  def get_csv_file(csv_docs):
41
  temp_dir3 = tempfile.TemporaryDirectory() # 임시 디렉토리를 생성합니다.
42
+ temp_filepath3 = os.path.join(temp_dir3.name, csv_docs.name) # 임시 파일 경로를 생성합니다.
43
  with open(temp_filepath3, "wb") as f: # 임시 파일을 바이너리 쓰기 모드로 엽니다.
44
  f.write(csv_docs.getvalue()) # PDF 문서의 내용을 임시 파일에 씁니다.
45
  csv_loader = CSVLoader(temp_filepath3) # PyPDFLoader를 사용해 PDF를 로드합니다.
 
48
 
49
  def get_json_file(json_docs):
50
  temp_dir4 = tempfile.TemporaryDirectory() # 임시 디렉토리를 생성합니다.
51
+ temp_filepath4 = os.path.join(temp_dir4.name, json_docs.name) # 임시 파일 경로를 생성합니다.
52
  with open(temp_filepath4, "wb") as f: # 임시 파일을 바이너리 쓰기 모드로 엽니다.
53
  f.write(json_docs.getvalue()) # PDF 문서의 내용을 임시 파일에 씁니다.
54
  json_loader = JSONLoader(temp_filepath4) # PyPDFLoader를 사용해 PDF를 로드합니다.