Nikhil0987 commited on
Commit
de7d060
·
verified ·
1 Parent(s): 83154c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,14 +3,14 @@ import json
3
  import google.generativeai as genai
4
 
5
 
6
- def add_to_json(goal):
7
  try:
8
  with open("test.json", "r") as file:
9
  data = json.load(file)
10
  except FileNotFoundError:
11
  data = {"goals": []} # Create an empty "goals" list if the file doesn't exist
12
 
13
- new_item = {"Goal": goal}
14
  data["goals"].append(new_item)
15
 
16
  with open("test.json", "w") as file:
 
3
  import google.generativeai as genai
4
 
5
 
6
+ def add_to_json(hole):
7
  try:
8
  with open("test.json", "r") as file:
9
  data = json.load(file)
10
  except FileNotFoundError:
11
  data = {"goals": []} # Create an empty "goals" list if the file doesn't exist
12
 
13
+ new_item = {"Goal": hole}
14
  data["goals"].append(new_item)
15
 
16
  with open("test.json", "w") as file: