please
Browse files
app.py
CHANGED
@@ -41,11 +41,12 @@ def get_text_file(text_docs):
|
|
41 |
|
42 |
def get_csv_file(csv_docs):
|
43 |
temp_dir = tempfile.TemporaryDirectory()
|
44 |
-
temp_filepath = os.path.join(temp_dir.name,
|
|
|
45 |
with open(temp_filepath, "wb") as f:
|
46 |
f.write(csv_docs.getvalue())
|
|
|
47 |
csv_loader = CSVLoader(temp_filepath)
|
48 |
-
# ์ค๋ฅ ๋ฐ์ํด์ ์์ธ ์ฒ๋ฆฌ ์ค์
|
49 |
try:
|
50 |
csv_content = csv_loader.load()
|
51 |
except Exception as e:
|
|
|
41 |
|
42 |
def get_csv_file(csv_docs):
|
43 |
temp_dir = tempfile.TemporaryDirectory()
|
44 |
+
temp_filepath = os.path.join(temp_dir.name, "temp_file.csv")
|
45 |
+
|
46 |
with open(temp_filepath, "wb") as f:
|
47 |
f.write(csv_docs.getvalue())
|
48 |
+
|
49 |
csv_loader = CSVLoader(temp_filepath)
|
|
|
50 |
try:
|
51 |
csv_content = csv_loader.load()
|
52 |
except Exception as e:
|