Update app.py
Browse files
app.py
CHANGED
|
@@ -54,8 +54,8 @@ def get_csv_file(csv_docs):
|
|
| 54 |
def get_json_file(json_docs):
|
| 55 |
temp_dir = tempfile.TemporaryDirectory()
|
| 56 |
temp_filepath = os.path.join(temp_dir.name, json_docs.name)
|
| 57 |
-
with open(temp_filepath, "
|
| 58 |
-
f.write(
|
| 59 |
json_loader = JSONLoader(
|
| 60 |
file_path=temp_filepath,
|
| 61 |
jq_schema='.messages[].content',
|
|
|
|
| 54 |
def get_json_file(json_docs):
|
| 55 |
temp_dir = tempfile.TemporaryDirectory()
|
| 56 |
temp_filepath = os.path.join(temp_dir.name, json_docs.name)
|
| 57 |
+
with open(temp_filepath, "wb") as f:
|
| 58 |
+
f.write(json_docs.getvalue())
|
| 59 |
json_loader = JSONLoader(
|
| 60 |
file_path=temp_filepath,
|
| 61 |
jq_schema='.messages[].content',
|