Commit
ยท
5828fce
1
Parent(s):
64a2b6b
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,8 @@ def get_pdf_text(pdf_docs):
|
|
28 |
def get_text_file(docs):
|
29 |
text_list = []
|
30 |
for doc in docs:
|
31 |
-
|
|
|
32 |
text_list.append(text)
|
33 |
return text_list
|
34 |
|
|
|
28 |
def get_text_file(docs):
|
29 |
text_list = []
|
30 |
for doc in docs:
|
31 |
+
doc_bytes = BytesIO(doc.read()) # ๋ฐ์ดํธ ๊ฐ์ฒด๋ฅผ ํ์ผ ํ์์ผ๋ก ๋ณํํฉ๋๋ค.
|
32 |
+
text = doc_bytes.read().decode('utf-8') # ํ์ผ์ ์ฝ๊ณ 'utf-8'๋ก ๋์ฝ๋ฉํ์ฌ ํ
์คํธ๋ฅผ ์ถ์ถํฉ๋๋ค.
|
33 |
text_list.append(text)
|
34 |
return text_list
|
35 |
|