Seetha commited on
Commit
ba8ad9f
·
1 Parent(s): 20004ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -505,11 +505,11 @@ def main():
505
  json_data = json.dumps(data_list)
506
 
507
  # Write the JSON data to a file
508
- with open("smalljson.json", "w+") as fi:
509
- #data = f.read()
510
- #f.seek(0)
511
  fi.write(json_data)
512
- #f.truncate()
513
  # api.upload_file(
514
  # path_or_fileobj=json_data,
515
  # path_in_repo="ch.json",
 
505
  json_data = json.dumps(data_list)
506
 
507
  # Write the JSON data to a file
508
+ with open("smalljson.json", "r+") as fi:
509
+ data = fi.read()
510
+ fi.seek(0)
511
  fi.write(json_data)
512
+ fi.truncate()
513
  # api.upload_file(
514
  # path_or_fileobj=json_data,
515
  # path_in_repo="ch.json",