Update app.py
Browse files
app.py
CHANGED
@@ -29,8 +29,13 @@ def get_pdf_text(pdf_docs):
|
|
29 |
# ์๋ ํ
์คํธ ์ถ์ถ ํจ์๋ฅผ ์์ฑ
|
30 |
|
31 |
def get_text_file(docs):
|
32 |
-
|
|
|
|
|
|
|
|
|
33 |
|
|
|
34 |
|
35 |
def get_csv_file(docs):
|
36 |
pass
|
|
|
29 |
# ์๋ ํ
์คํธ ์ถ์ถ ํจ์๋ฅผ ์์ฑ
|
30 |
|
31 |
def get_text_file(docs):
|
32 |
+
with NamedTemporaryFile() as temp_file:
|
33 |
+
temp_file.write(docs.getvalue())
|
34 |
+
temp_file.seek(0)
|
35 |
+
text_loader = TextLoader(temp_file.name)
|
36 |
+
text_doc = text_loader.load()
|
37 |
|
38 |
+
return text_doc
|
39 |
|
40 |
def get_csv_file(docs):
|
41 |
pass
|