Spaces:
Runtime error
Runtime error
JinHyeong99
commited on
Commit
โข
131879f
1
Parent(s):
7d47c0f
app.py
CHANGED
@@ -29,6 +29,8 @@ def get_pdf_text(pdf_docs):
|
|
29 |
# ์๋ ํ
์คํธ ์ถ์ถ ํจ์๋ฅผ ์์ฑ
|
30 |
|
31 |
def get_text_file(text_docs):
|
|
|
|
|
32 |
text_loader = TextLoader(text_docs.name)
|
33 |
text_doc = text_loader.load()
|
34 |
return text_doc
|
|
|
29 |
# ์๋ ํ
์คํธ ์ถ์ถ ํจ์๋ฅผ ์์ฑ
|
30 |
|
31 |
def get_text_file(text_docs):
|
32 |
+
temp_dir = tempfile.TemporaryDirectory() # ์์ ๋๋ ํ ๋ฆฌ๋ฅผ ์์ฑํฉ๋๋ค.
|
33 |
+
temp_filepath = os.path.join(temp_dir.name, text_docs.name) # ์์ ํ์ผ ๊ฒฝ๋ก๋ฅผ ์์ฑํฉ๋๋ค.
|
34 |
text_loader = TextLoader(text_docs.name)
|
35 |
text_doc = text_loader.load()
|
36 |
return text_doc
|