CosmoAI commited on
Commit
0f58c4b
·
verified ·
1 Parent(s): 83c2d91

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -16,10 +16,9 @@ def add_to_json(goal):
16
  data = {"goals": []} # Create the file with an empty 'goals' list if it doesn't exist
17
 
18
  new_item = {"Goal": goal}
 
19
 
20
- with open("test.json", "a") as file:
21
-
22
- data["goals"].append(new_item)
23
  json.dump(data, file, indent=4)
24
 
25
 
 
16
  data = {"goals": []} # Create the file with an empty 'goals' list if it doesn't exist
17
 
18
  new_item = {"Goal": goal}
19
+ data["goals"].append(new_item)
20
 
21
+ with open("test.json", "w") as file:
 
 
22
  json.dump(data, file, indent=4)
23
 
24