Spaces:
Sleeping
Sleeping
Download src/utils/reflection.py from rahulmolasi/SmartDayAI: direct link, hf CLI and curl.
- Browser
- Download file 448 Bytes
-
https://huggingface.co/spaces/rahulmolasi/SmartDayAI/resolve/main/src/utils/reflection.py
- Command line
-
hf download hf://spaces/rahulmolasi/SmartDayAI/src/utils/reflection.py
-
curl -L -o reflection.py https://huggingface.co/spaces/rahulmolasi/SmartDayAI/resolve/main/src/utils/reflection.py
448 Bytes
| from datetime import datetime | |
| from utils.storage import load_json, save_json | |
| REFLECTION_FILE = "data/reflections.json" | |
| def add_reflection(reflection_text): | |
| reflections = load_json(REFLECTION_FILE) | |
| reflections.append({ | |
| "date": datetime.now().strftime("%Y-%m-%d"), | |
| "reflection": reflection_text | |
| }) | |
| save_json(REFLECTION_FILE, reflections) | |
| return True | |
| def get_reflections(): | |
| return load_json(REFLECTION_FILE) | |