Seetha commited on
Commit
ea54491
1 Parent(s): 1450b7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -505,11 +505,13 @@ def main():
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",
 
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
+ file_jso = open('smalljson.json','r+')
512
+ file.truncate(0)
513
+ file.write(json_data)
514
+ fi.close()
515
  # api.upload_file(
516
  # path_or_fileobj=json_data,
517
  # path_in_repo="ch.json",