han-byeol commited on
Commit
4ea3a21
ยท
1 Parent(s): 2f27575

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -28,7 +28,7 @@ def get_pdf_text(pdf_docs):
28
  # ๊ณผ์ œ
29
  # ์•„๋ž˜ ํ…์ŠคํŠธ ์ถ”์ถœ ํ•จ์ˆ˜๋ฅผ ์ž‘์„ฑ
30
  # txt ๋ฌธ์„œ๋กœ๋ถ€ํ„ฐ ํ…์ŠคํŠธ๋ฅผ ์ถ”์ถœํ•˜๋Š” ํ•จ์ˆ˜
31
- def get_text_file(docs):
32
  temp_dir = tempfile.TemporaryDirectory()
33
  temp_filepath = os.path.join(temp_dir.name, txt_docs.name)
34
  with open(temp_filepath, "wb") as f:
@@ -39,7 +39,7 @@ def get_text_file(docs):
39
 
40
 
41
  # csv ๋ฌธ์„œ๋กœ๋ถ€ํ„ฐ ํ…์ŠคํŠธ๋ฅผ ์ถ”์ถœํ•˜๋Š” ํ•จ์ˆ˜
42
- def get_csv_file(docs):
43
  temp_dir = tempfile.TemporaryDirectory()
44
  temp_filepath = os.path.join(temp_dir.name, csv_docs.name)
45
  with open(temp_filepath, "wb") as f:
@@ -50,7 +50,7 @@ def get_csv_file(docs):
50
 
51
 
52
  # json ๋ฌธ์„œ๋กœ๋ถ€ํ„ฐ ํ…์ŠคํŠธ๋ฅผ ์ถ”์ถœํ•˜๋Š” ํ•จ์ˆ˜
53
- def get_json_file(file):
54
  temp_dir = tempfile.TemporaryDirectory()
55
  temp_filepath = os.path.join(temp_dir.name, file.name)
56
  with open(temp_filepath, "wb") as f:
 
28
  # ๊ณผ์ œ
29
  # ์•„๋ž˜ ํ…์ŠคํŠธ ์ถ”์ถœ ํ•จ์ˆ˜๋ฅผ ์ž‘์„ฑ
30
  # txt ๋ฌธ์„œ๋กœ๋ถ€ํ„ฐ ํ…์ŠคํŠธ๋ฅผ ์ถ”์ถœํ•˜๋Š” ํ•จ์ˆ˜
31
+ def get_text_file(txt_docs):
32
  temp_dir = tempfile.TemporaryDirectory()
33
  temp_filepath = os.path.join(temp_dir.name, txt_docs.name)
34
  with open(temp_filepath, "wb") as f:
 
39
 
40
 
41
  # csv ๋ฌธ์„œ๋กœ๋ถ€ํ„ฐ ํ…์ŠคํŠธ๋ฅผ ์ถ”์ถœํ•˜๋Š” ํ•จ์ˆ˜
42
+ def get_csv_file(csv_docs):
43
  temp_dir = tempfile.TemporaryDirectory()
44
  temp_filepath = os.path.join(temp_dir.name, csv_docs.name)
45
  with open(temp_filepath, "wb") as f:
 
50
 
51
 
52
  # json ๋ฌธ์„œ๋กœ๋ถ€ํ„ฐ ํ…์ŠคํŠธ๋ฅผ ์ถ”์ถœํ•˜๋Š” ํ•จ์ˆ˜
53
+ def get_json_file(json_file):
54
  temp_dir = tempfile.TemporaryDirectory()
55
  temp_filepath = os.path.join(temp_dir.name, file.name)
56
  with open(temp_filepath, "wb") as f: