akman12914 commited on
Commit
9560184
·
1 Parent(s): 67f1bb1

JSONLoader revise

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -55,7 +55,7 @@ def get_csv_file(docs):
55
  def get_json_file(docs):
56
  temp_dir = tempfile.TemporaryDirectory()
57
  temp_filepath = os.path.join(temp_dir.name, docs.name)
58
- with open(temp_filepath, "wb") as f:
59
  f.write(docs.getvalue())
60
  json_loader = JSONLoader(file_path=temp_filepath,
61
  jq_schema='.messages[].userId',
 
55
  def get_json_file(docs):
56
  temp_dir = tempfile.TemporaryDirectory()
57
  temp_filepath = os.path.join(temp_dir.name, docs.name)
58
+ with open(temp_filepath, 'wb') as f:
59
  f.write(docs.getvalue())
60
  json_loader = JSONLoader(file_path=temp_filepath,
61
  jq_schema='.messages[].userId',