Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import google.generativeai as genai
|
|
7 |
|
8 |
|
9 |
|
10 |
-
def add_to_json(
|
11 |
with open("test.json", "r") as file:
|
12 |
data = json.load(file)
|
13 |
|
@@ -15,7 +15,7 @@ import google.generativeai as genai
|
|
15 |
"goal": new_goal,
|
16 |
# "reminder": new_reminder
|
17 |
}
|
18 |
-
data["goals"].append(new_item)
|
19 |
|
20 |
with open("test.json", "w") as file:
|
21 |
json.dump(data, file, indent=4)
|
|
|
7 |
|
8 |
|
9 |
|
10 |
+
def add_to_json():
|
11 |
with open("test.json", "r") as file:
|
12 |
data = json.load(file)
|
13 |
|
|
|
15 |
"goal": new_goal,
|
16 |
# "reminder": new_reminder
|
17 |
}
|
18 |
+
data["goals"].append(new_item)(new_goal)
|
19 |
|
20 |
with open("test.json", "w") as file:
|
21 |
json.dump(data, file, indent=4)
|