namkwonwoo commited on
Commit
8f88584
·
1 Parent(s): d3ff045

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -48,8 +48,13 @@ def get_json_file(json_docs, jq_schema=None):
48
  temp_filepath = os.path.join(temp_dir.name, json_docs.name)
49
  with open(temp_filepath, "wb") as f:
50
  f.write(json_docs.getvalue())
51
- json_loader = JSONLoader(temp_filepath, jq_schema)
 
 
 
 
52
  json_doc = json_loader.load()
 
53
  return json_doc
54
 
55
 
 
48
  temp_filepath = os.path.join(temp_dir.name, json_docs.name)
49
  with open(temp_filepath, "wb") as f:
50
  f.write(json_docs.getvalue())
51
+ if jq_schema is not None:
52
+ json_loader = JSONLoader(temp_filepath, jq_schema)
53
+ else:
54
+ json_loader = JSONLoader(temp_filepath)
55
+
56
  json_doc = json_loader.load()
57
+
58
  return json_doc
59
 
60