panda47 commited on
Commit
2defe5d
·
1 Parent(s): 9e49d85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -51,12 +51,7 @@ def get_json_file(json_docs):
51
  temp_dir = tempfile.TemporaryDirectory()
52
  json_loader=JSONLoader(
53
  temp_filepath = os.path.join(temp_dir.name, json_docs.name)
54
- with open(temp_filepath, "wb") as f:
55
- s = f.write(json_docs.getvalue())
56
- s = s.replace('\t','')
57
- s = s.replace('\n','')
58
- s = s.replace(',}','}')
59
- s = s.replace(',]',']'),
60
  jq_schema='.',
61
  text_content=False,
62
  json_lines=True
 
51
  temp_dir = tempfile.TemporaryDirectory()
52
  json_loader=JSONLoader(
53
  temp_filepath = os.path.join(temp_dir.name, json_docs.name)
54
+ with open(temp_filepath, "wb") as f:f.write(csv_docs.getvalue()),
 
 
 
 
 
55
  jq_schema='.',
56
  text_content=False,
57
  json_lines=True