Spaces:
Sleeping
Sleeping
Commit
·
ef9ba64
1
Parent(s):
72eb9e9
Update app.py
Browse files
app.py
CHANGED
@@ -50,8 +50,7 @@ def get_json_file(json_docs):
|
|
50 |
temp_dir = tempfile.TemporaryDirectory()
|
51 |
temp_filepath = os.path.join(temp_dir.name, json_docs.name)
|
52 |
with open(temp_filepath, "wb") as f:
|
53 |
-
f.write(json_docs.
|
54 |
-
|
55 |
json_loader = JSONLoader(file_path=temp_filepath)
|
56 |
json_doc = json_loader.load()
|
57 |
return json_doc
|
|
|
50 |
temp_dir = tempfile.TemporaryDirectory()
|
51 |
temp_filepath = os.path.join(temp_dir.name, json_docs.name)
|
52 |
with open(temp_filepath, "wb") as f:
|
53 |
+
f.write(json_docs.getvalue())
|
|
|
54 |
json_loader = JSONLoader(file_path=temp_filepath)
|
55 |
json_doc = json_loader.load()
|
56 |
return json_doc
|