Spaces:
Sleeping
Sleeping
Nikhil0987
commited on
Commit
•
3efabd9
1
Parent(s):
1daa98d
HELLO
Browse files- remainder.py +7 -7
remainder.py
CHANGED
@@ -27,16 +27,16 @@ def rem():
|
|
27 |
|
28 |
}
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
34 |
|
35 |
|
36 |
-
allreminder.append(reminder)
|
37 |
|
38 |
-
|
39 |
-
|
40 |
|
41 |
|
42 |
st.button("Save",on_click=save_data)
|
|
|
27 |
|
28 |
}
|
29 |
|
30 |
+
def save_data():
|
31 |
+
with open ("database/data.json")as file:
|
32 |
+
data =json.load(file)
|
33 |
+
allreminder = data["reminders"]
|
34 |
+
allreminder.append(reminder)
|
35 |
|
36 |
|
|
|
37 |
|
38 |
+
with open("database/data.json","w") as file:
|
39 |
+
json.dump(data,file,indent=4)
|
40 |
|
41 |
|
42 |
st.button("Save",on_click=save_data)
|