Spaces:
Sleeping
Sleeping
Commit
·
833e5d5
1
Parent(s):
968bb54
edit app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ def get_text_file(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 |
loader = CSVLoader(temp_filepath)
|
48 |
csv_doc = loader.load()
|
@@ -52,7 +52,7 @@ def get_csv_file(csv_docs):
|
|
52 |
def get_json_file(json_docs):
|
53 |
temp_dir = tempfile.TemporaryDirectory()
|
54 |
temp_filepath = os.path.join(temp_dir.name, json_docs.name)
|
55 |
-
with open(temp_filepath, "
|
56 |
f.write(json_docs.getvalue())
|
57 |
loader = JSONLoader(temp_filepath, jq_schema="테스트")
|
58 |
json_doc = 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, "utf-8") as f:
|
46 |
f.write(csv_docs.getvalue())
|
47 |
loader = CSVLoader(temp_filepath)
|
48 |
csv_doc = loader.load()
|
|
|
52 |
def get_json_file(json_docs):
|
53 |
temp_dir = tempfile.TemporaryDirectory()
|
54 |
temp_filepath = os.path.join(temp_dir.name, json_docs.name)
|
55 |
+
with open(temp_filepath, "utf-8") as f:
|
56 |
f.write(json_docs.getvalue())
|
57 |
loader = JSONLoader(temp_filepath, jq_schema="테스트")
|
58 |
json_doc = loader.load()
|