Daoneeee commited on
Commit
53f3c14
·
1 Parent(s): c241787

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -36,7 +36,7 @@ def get_text_file(text_docs):
36
  f.write(text_docs.getvalue()) # PDF 문서의 내용을 임시 파일에 씁니다.
37
  pdf_loader = PyPDFLoader(temp_filepath) # PyPDFLoader를 사용해 PDF를 로드합니다.
38
  pdf_doc = pdf_loader.load() # 텍스트를 추출합니다.
39
- return pdf_doc # 추출한 텍스트를 반환합니다.
40
 
41
  def get_csv_file(csv_docs):
42
  temp_dir = tempfile.TemporaryDirectory() # 임시 디렉토리를 생성합니다.
@@ -45,7 +45,7 @@ def get_csv_file(csv_docs):
45
  f.write(csv_docs.getvalue()) # PDF 문서의 내용을 임시 파일에 씁니다.
46
  pdf_loader = PyPDFLoader(temp_filepath) # PyPDFLoader를 사용해 PDF를 로드합니다.
47
  pdf_doc = pdf_loader.load() # 텍스트를 추출합니다.
48
- return pdf_doc # 추출한 텍스트를 반환합니다.
49
 
50
 
51
  def get_json_file(json_docs):
@@ -55,7 +55,7 @@ def get_json_file(json_docs):
55
  f.write(json_docs.getvalue()) # PDF 문서의 내용을 임시 파일에 씁니다.
56
  pdf_loader = PyPDFLoader(temp_filepath) # PyPDFLoader를 사용해 PDF를 로드합니다.
57
  pdf_doc = pdf_loader.load() # 텍스트를 추출합니다.
58
- return pdf_doc # 추출한 텍스트를 반환합니다.
59
 
60
 
61
 
 
36
  f.write(text_docs.getvalue()) # PDF 문서의 내용을 임시 파일에 씁니다.
37
  pdf_loader = PyPDFLoader(temp_filepath) # PyPDFLoader를 사용해 PDF를 로드합니다.
38
  pdf_doc = pdf_loader.load() # 텍스트를 추출합니다.
39
+ return text_doc # 추출한 텍스트를 반환합니다.
40
 
41
  def get_csv_file(csv_docs):
42
  temp_dir = tempfile.TemporaryDirectory() # 임시 디렉토리를 생성합니다.
 
45
  f.write(csv_docs.getvalue()) # PDF 문서의 내용을 임시 파일에 씁니다.
46
  pdf_loader = PyPDFLoader(temp_filepath) # PyPDFLoader를 사용해 PDF를 로드합니다.
47
  pdf_doc = pdf_loader.load() # 텍스트를 추출합니다.
48
+ return csv_doc # 추출한 텍스트를 반환합니다.
49
 
50
 
51
  def get_json_file(json_docs):
 
55
  f.write(json_docs.getvalue()) # PDF 문서의 내용을 임시 파일에 씁니다.
56
  pdf_loader = PyPDFLoader(temp_filepath) # PyPDFLoader를 사용해 PDF를 로드합니다.
57
  pdf_doc = pdf_loader.load() # 텍스트를 추출합니다.
58
+ return json_doc # 추출한 텍스트를 반환합니다.
59
 
60
 
61