panda47 commited on
Commit
61165a1
·
1 Parent(s): 2d2af20

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -56,8 +56,12 @@ def get_json_file(json_docs):
56
  json_lines=True
57
  )
58
  with open(temp_filepath, "wb") as f:
59
- f.write(json_docs.getvalue())
60
- json_doc = json_loader.load()
 
 
 
 
61
  return json_doc
62
 
63
 
 
56
  json_lines=True
57
  )
58
  with open(temp_filepath, "wb") as f:
59
+ s = f.write(json_docs.getvalue())
60
+ s = s.replace('\t','')
61
+ s = s.replace('\n','')
62
+ s = s.replace(',}','}')
63
+ s = s.replace(',]',']')
64
+ json_doc = json_loader.loads(s)
65
  return json_doc
66
 
67