Commit
ยท
0df3cee
1
Parent(s):
394ee12
Update app.py
Browse files
app.py
CHANGED
@@ -25,8 +25,13 @@ def get_pdf_text(pdf_docs):
|
|
25 |
# ๊ณผ์
|
26 |
# ์๋ ํ
์คํธ ์ถ์ถ ํจ์๋ฅผ ์์ฑ
|
27 |
def get_text_file(docs):
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
def get_csv_file(docs):
|
32 |
pass
|
|
|
25 |
# ๊ณผ์
|
26 |
# ์๋ ํ
์คํธ ์ถ์ถ ํจ์๋ฅผ ์์ฑ
|
27 |
def get_text_file(docs):
|
28 |
+
text_list = [] # ํ
์คํธ๋ฅผ ์ ์ฅํ ๋ฆฌ์คํธ
|
29 |
+
|
30 |
+
for doc in docs:
|
31 |
+
content = doc.getvalue().decode("utf-8") # ํ์ผ ๋ด์ฉ์ ๊ฐ์ ธ์์ UTF-8๋ก ๋์ฝ๋ฉํ์ฌ ๋ฌธ์์ด๋ก ๋ณํ
|
32 |
+
text_list.append(content) # ํ
์คํธ๋ฅผ ๋ฆฌ์คํธ์ ์ถ๊ฐ
|
33 |
+
|
34 |
+
return text_list # ํ
์คํธ๊ฐ ๋ด๊ธด ๋ฆฌ์คํธ ๋ฐํ
|
35 |
|
36 |
def get_csv_file(docs):
|
37 |
pass
|