Update app.py
Browse files
app.py
CHANGED
@@ -22,6 +22,14 @@ def get_pdf_text(pdf_docs):
|
|
22 |
pdf_doc = pdf_loader.load()
|
23 |
return pdf_doc
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
# ๊ณผ์ ๋ถ๋ถ
|
26 |
def get_text_file(docs):
|
27 |
text_loader = TextLoader(docs.name)
|
|
|
22 |
pdf_doc = pdf_loader.load()
|
23 |
return pdf_doc
|
24 |
|
25 |
+
# ์ถ๊ฐ๋ ๋ถ๋ถ: python-dotenv ํจํค์ง ์ค์น
|
26 |
+
import subprocess
|
27 |
+
subprocess.run(["pip", "install", "python-dotenv"])
|
28 |
+
|
29 |
+
# .env ํ์ผ์์ ํ๊ฒฝ ๋ณ์ ๋ก๋
|
30 |
+
from dotenv import load_dotenv
|
31 |
+
load_dotenv()
|
32 |
+
|
33 |
# ๊ณผ์ ๋ถ๋ถ
|
34 |
def get_text_file(docs):
|
35 |
text_loader = TextLoader(docs.name)
|