Commit
ยท
7368387
1
Parent(s):
f7e4221
Update app.py
Browse files
app.py
CHANGED
@@ -26,13 +26,14 @@ def get_pdf_text(pdf_docs):
|
|
26 |
# ๊ณผ์
|
27 |
# ์๋ ํ
์คํธ ์ถ์ถ ํจ์๋ฅผ ์์ฑ
|
28 |
def get_text_file(docs):
|
29 |
-
# ํ
์คํธ ํ์ผ๋ก๋ถํฐ ํ
์คํธ๋ฅผ ์ฝ์ด์ ๋ฆฌ์คํธ์ ์ ์ฅํฉ๋๋ค.
|
30 |
text_list = []
|
31 |
-
for
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
36 |
|
37 |
|
38 |
def get_csv_file(docs):
|
|
|
26 |
# ๊ณผ์
|
27 |
# ์๋ ํ
์คํธ ์ถ์ถ ํจ์๋ฅผ ์์ฑ
|
28 |
def get_text_file(docs):
|
|
|
29 |
text_list = []
|
30 |
+
for file in docs:
|
31 |
+
if file.type == 'text/plain':
|
32 |
+
# ํ์ผ์ด .txt์ธ ๊ฒฝ์ฐ
|
33 |
+
text = extract_text_from_file(file)
|
34 |
+
if text:
|
35 |
+
text_list.append(text)
|
36 |
+
return text_list
|
37 |
|
38 |
|
39 |
def get_csv_file(docs):
|