Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +2 -2
src/streamlit_app.py
CHANGED
|
@@ -39,7 +39,7 @@ def get_pdf_text(pdf_docs):
|
|
| 39 |
# txt 파일로부터 text 추출
|
| 40 |
def get_text_file(txt_docs):
|
| 41 |
temp_dir = tempfile.TemporaryDirectory()
|
| 42 |
-
temp_filepath = os.path.join(temp_dir.name, txt_docs.name)
|
| 43 |
with open(temp_filepath, "wb") as f:
|
| 44 |
f.write(txt_docs.getvalue())
|
| 45 |
text_loader = TextLoader(temp_filepath)
|
|
@@ -50,7 +50,7 @@ def get_text_file(txt_docs):
|
|
| 50 |
def get_csv_file(csv_docs):
|
| 51 |
temp_dir = tempfile.TemporaryDirectory()
|
| 52 |
temp_filepath = os.path.join(temp_dir.name, csv_docs.name)
|
| 53 |
-
with open(temp_filepath,
|
| 54 |
f.write(csv_docs.getvalue())
|
| 55 |
csv_loader = CSVLoader(temp_filepath)
|
| 56 |
csv_doc = csv_loader.load()
|
|
|
|
| 39 |
# txt 파일로부터 text 추출
|
| 40 |
def get_text_file(txt_docs):
|
| 41 |
temp_dir = tempfile.TemporaryDirectory()
|
| 42 |
+
temp_filepath = os.path.join(temp_dir.name, txt_docs.name)
|
| 43 |
with open(temp_filepath, "wb") as f:
|
| 44 |
f.write(txt_docs.getvalue())
|
| 45 |
text_loader = TextLoader(temp_filepath)
|
|
|
|
| 50 |
def get_csv_file(csv_docs):
|
| 51 |
temp_dir = tempfile.TemporaryDirectory()
|
| 52 |
temp_filepath = os.path.join(temp_dir.name, csv_docs.name)
|
| 53 |
+
with open(temp_filepath,"wb") as f:
|
| 54 |
f.write(csv_docs.getvalue())
|
| 55 |
csv_loader = CSVLoader(temp_filepath)
|
| 56 |
csv_doc = csv_loader.load()
|