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