minji1115
commited on
Commit
·
05ac76e
1
Parent(s):
88578fe
wb로 변경
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ def get_text_file(text_docs):
|
|
42 |
def get_csv_file(csv_docs):
|
43 |
temp_dir = tempfile.TemporaryDirectory()
|
44 |
temp_filepath = os.path.join(temp_dir.name, csv_docs.name)
|
45 |
-
with open(temp_filepath, "
|
46 |
f.write(csv_docs.getvalue())
|
47 |
csv_loader = CSVLoader(temp_filepath)
|
48 |
csv_docs = csv_loader.load()
|
@@ -51,7 +51,7 @@ def get_csv_file(csv_docs):
|
|
51 |
def get_json_file(json_docs):
|
52 |
temp_dir = tempfile.TemporaryDirectory()
|
53 |
temp_filepath = os.path.join(temp_dir.name, json_docs.name)
|
54 |
-
with open(temp_filepath, "
|
55 |
f.write(json_docs.getvalue())
|
56 |
json_loader = JSONLoader(temp_filepath, 'users[].firstName')
|
57 |
json_docs = json_loader.load()
|
|
|
42 |
def get_csv_file(csv_docs):
|
43 |
temp_dir = tempfile.TemporaryDirectory()
|
44 |
temp_filepath = os.path.join(temp_dir.name, csv_docs.name)
|
45 |
+
with open(temp_filepath, "wb") as f:
|
46 |
f.write(csv_docs.getvalue())
|
47 |
csv_loader = CSVLoader(temp_filepath)
|
48 |
csv_docs = csv_loader.load()
|
|
|
51 |
def get_json_file(json_docs):
|
52 |
temp_dir = tempfile.TemporaryDirectory()
|
53 |
temp_filepath = os.path.join(temp_dir.name, json_docs.name)
|
54 |
+
with open(temp_filepath, "wb") as f:
|
55 |
f.write(json_docs.getvalue())
|
56 |
json_loader = JSONLoader(temp_filepath, 'users[].firstName')
|
57 |
json_docs = json_loader.load()
|