trlpop101 commited on
Commit
a1ee341
·
verified ·
1 Parent(s): 1f5128c

indent 수정

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +5 -2
src/streamlit_app.py CHANGED
@@ -51,10 +51,13 @@ def get_text_file(txt_docs):
51
  def get_csv_file(csv_docs):
52
  temp_dir = tempfile.TemporaryDirectory() # 임시 디렉토리를 생성합니다.
53
  temp_filepath = os.path.join(temp_dir.name, csv_docs.name)
 
54
  with open(temp_filepath, "wb") as f: # 임시 파일을 바이너리 쓰기 모드로 엽니다.
55
- f.write(csv_docs.getvalue()) # PDF 문서의 내용을 임시 파일에 씁니다.
56
- csv_loader = CSVLoader(temp_filepath) # PyPDFLoader를 사용해 PDF를 로드합니다.
 
57
  csv_doc = csv_loader.load() # 텍스트를 추출합니다.
 
58
  return csv_doc
59
 
60
  # def get_json_file(docs):
 
51
  def get_csv_file(csv_docs):
52
  temp_dir = tempfile.TemporaryDirectory() # 임시 디렉토리를 생성합니다.
53
  temp_filepath = os.path.join(temp_dir.name, csv_docs.name)
54
+
55
  with open(temp_filepath, "wb") as f: # 임시 파일을 바이너리 쓰기 모드로 엽니다.
56
+ f.write(csv_docs.getvalue()) # 내용을 임시 파일에 씁니다.
57
+
58
+ csv_loader = CSVLoader(temp_filepath) # CSVLoader를 사용해 로드합니다.
59
  csv_doc = csv_loader.load() # 텍스트를 추출합니다.
60
+
61
  return csv_doc
62
 
63
  # def get_json_file(docs):