Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
| 512 |
-
|
|
|
|
|
|
|
| 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",
|