minji1115
commited on
Commit
·
1426637
1
Parent(s):
c42d2fa
기본
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def get_text_file(text_docs):
|
|
41 |
def get_csv_file(csv_docs):
|
42 |
temp_dir = tempfile.TemporaryDirectory()
|
43 |
temp_filepath = os.path.join(temp_dir.name, csv_docs.name)
|
44 |
-
with open(temp_filepath, "
|
45 |
f.write(csv_docs.getvalue())
|
46 |
csv_loader = CSVLoader(temp_filepath)
|
47 |
csv_docs = csv_loader.load()
|
@@ -50,7 +50,7 @@ def get_csv_file(csv_docs):
|
|
50 |
def get_json_file(json_docs):
|
51 |
temp_dir = tempfile.TemporaryDirectory()
|
52 |
temp_filepath = os.path.join(temp_dir.name, json_docs.name)
|
53 |
-
with open(temp_filepath, "
|
54 |
f.write(json_docs.getvalue())
|
55 |
json_loader = JSONLoader(temp_filepath, 'users')
|
56 |
json_docs = json_loader.load()
|
|
|
41 |
def get_csv_file(csv_docs):
|
42 |
temp_dir = tempfile.TemporaryDirectory()
|
43 |
temp_filepath = os.path.join(temp_dir.name, csv_docs.name)
|
44 |
+
with open(temp_filepath, "w", encoding="utf-8") as f:
|
45 |
f.write(csv_docs.getvalue())
|
46 |
csv_loader = CSVLoader(temp_filepath)
|
47 |
csv_docs = csv_loader.load()
|
|
|
50 |
def get_json_file(json_docs):
|
51 |
temp_dir = tempfile.TemporaryDirectory()
|
52 |
temp_filepath = os.path.join(temp_dir.name, json_docs.name)
|
53 |
+
with open(temp_filepath, "w") as f:
|
54 |
f.write(json_docs.getvalue())
|
55 |
json_loader = JSONLoader(temp_filepath, 'users')
|
56 |
json_docs = json_loader.load()
|