Spaces:
Running
Running
Commit ·
c47dbdc
1
Parent(s): 63959ee
Example Fig Tree
Browse files- app.py +15 -1
- garden.json +1 -15
- plant_photos/20260609_144532_063771.jpg +0 -0
- plant_photos/20260609_144544_042532.jpg +0 -0
- plant_photos/20260609_144544_877695.jpg +0 -0
- plant_photos/20260609_144546_434075.jpg +0 -0
- plant_photos/20260609_144604_807849.jpg +0 -0
- plant_photos/20260609_144621_846602.jpg +0 -0
- plant_photos/20260609_154426_716855.jpg +0 -0
- plant_photos/20260609_161828_374632.jpg +0 -0
- plant_photos/20260609_161934_281363.jpg +0 -0
- plant_photos/20260609_162121_265719.jpg +0 -0
- plant_photos/20260609_162136_326565.jpg +0 -0
- plant_photos/20260609_162139_721467.jpg +0 -0
- plant_photos/20260609_162157_712755.jpg +0 -0
- plant_photos/20260609_162158_055439.jpg +0 -0
- plant_photos/20260609_162201_673148.jpg +0 -0
- plant_photos/20260609_184909_739687.jpg +0 -0
- plant_photos/20260610_173521_694037.jpg +0 -0
- plant_photos/20260610_173832_451825.jpg +0 -0
- plant_photos/20260610_184152_772649.jpg +0 -0
- plant_photos/20260610_184300_312355.jpg +0 -0
- plant_photos/20260610_184812_582116.jpg +0 -0
- plant_photos/20260610_185223_963988.jpg +0 -0
- plant_photos/20260610_185859_130587.jpg +0 -0
- plant_photos/20260610_185940_276480.jpg +0 -0
- plant_photos/20260610_190129_605274.jpg +0 -0
- plant_photos/20260610_191055_616409.jpg +0 -0
- plant_photos/20260610_191439_122462.jpg +0 -0
- plant_photos/20260610_191724_892007.jpg +0 -0
- plant_photos/20260610_192329_954336.jpg +0 -0
- plant_photos/20260610_192436_518281.jpg +0 -0
- plant_photos/20260610_192851_612416.jpg +0 -0
- plant_photos/20260610_192903_546979.jpg +0 -0
- plant_photos/20260610_193204_148767.jpg +0 -0
- plant_photos/20260610_194841_632064.jpg +0 -0
- plant_photos/20260610_200651_986552.jpg +0 -0
- plant_photos/20260610_211240_094893.jpg +0 -0
app.py
CHANGED
|
@@ -68,7 +68,21 @@ def _photos_dir(user_id: str) -> Path:
|
|
| 68 |
def load_garden(user_id: str) -> list[dict]:
|
| 69 |
"""Load saved garden from disk."""
|
| 70 |
# before loading, update the last_watered field for plants that haven't been watered since the last rain date to avoid overwatering after a period of absence
|
| 71 |
-
garden = [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
garden_file = _garden_file(user_id)
|
| 74 |
if garden_file.exists():
|
|
|
|
| 68 |
def load_garden(user_id: str) -> list[dict]:
|
| 69 |
"""Load saved garden from disk."""
|
| 70 |
# before loading, update the last_watered field for plants that haven't been watered since the last rain date to avoid overwatering after a period of absence
|
| 71 |
+
garden = [{
|
| 72 |
+
"id": "20260610_211240_094893",
|
| 73 |
+
"nickname": "Example Fig Tree",
|
| 74 |
+
"photo": "plant_photos\\Example_Fig_Tree.jpg",
|
| 75 |
+
"genus": "Ficus",
|
| 76 |
+
"confidence": 87.0,
|
| 77 |
+
"added": datetime.date.today().isoformat(),
|
| 78 |
+
"last_watered": None,
|
| 79 |
+
"rained": False,
|
| 80 |
+
"watering_frequency_days": "Regular watering",
|
| 81 |
+
"sunlight": "full sunlight",
|
| 82 |
+
"soil": "sandy",
|
| 83 |
+
"fertilization_type": "Balanced",
|
| 84 |
+
"notes": "Fig Tree care info. Replace with real data."
|
| 85 |
+
}]
|
| 86 |
|
| 87 |
garden_file = _garden_file(user_id)
|
| 88 |
if garden_file.exists():
|
garden.json
CHANGED
|
@@ -13,20 +13,6 @@
|
|
| 13 |
"soil": "sandy",
|
| 14 |
"fertilization_type": "Balanced",
|
| 15 |
"notes": "Fig Tree care info. Replace with real data."
|
| 16 |
-
},
|
| 17 |
-
{
|
| 18 |
-
"id": "20260610_211240_094893",
|
| 19 |
-
"nickname": "figuier",
|
| 20 |
-
"photo": "plant_photos\\20260610_211240_094893.jpg",
|
| 21 |
-
"genus": "Ficus",
|
| 22 |
-
"confidence": 87.0,
|
| 23 |
-
"added": "2026-06-10",
|
| 24 |
-
"last_watered": "2026-06-14",
|
| 25 |
-
"rained": false,
|
| 26 |
-
"watering_frequency_days": "Regular watering",
|
| 27 |
-
"sunlight": "full sunlight",
|
| 28 |
-
"soil": "sandy",
|
| 29 |
-
"fertilization_type": "Balanced",
|
| 30 |
-
"notes": "Fig Tree care info. Replace with real data."
|
| 31 |
}
|
|
|
|
| 32 |
]
|
|
|
|
| 13 |
"soil": "sandy",
|
| 14 |
"fertilization_type": "Balanced",
|
| 15 |
"notes": "Fig Tree care info. Replace with real data."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
}
|
| 17 |
+
|
| 18 |
]
|
plant_photos/20260609_144532_063771.jpg
DELETED
|
Binary file (41 kB)
|
|
|
plant_photos/20260609_144544_042532.jpg
DELETED
|
Binary file (41 kB)
|
|
|
plant_photos/20260609_144544_877695.jpg
DELETED
|
Binary file (41 kB)
|
|
|
plant_photos/20260609_144546_434075.jpg
DELETED
|
Binary file (41 kB)
|
|
|
plant_photos/20260609_144604_807849.jpg
DELETED
|
Binary file (41 kB)
|
|
|
plant_photos/20260609_144621_846602.jpg
DELETED
|
Binary file (37.4 kB)
|
|
|
plant_photos/20260609_154426_716855.jpg
DELETED
|
Binary file (41 kB)
|
|
|
plant_photos/20260609_161828_374632.jpg
DELETED
|
Binary file (41 kB)
|
|
|
plant_photos/20260609_161934_281363.jpg
DELETED
|
Binary file (41 kB)
|
|
|
plant_photos/20260609_162121_265719.jpg
DELETED
|
Binary file (41 kB)
|
|
|
plant_photos/20260609_162136_326565.jpg
DELETED
|
Binary file (41 kB)
|
|
|
plant_photos/20260609_162139_721467.jpg
DELETED
|
Binary file (41 kB)
|
|
|
plant_photos/20260609_162157_712755.jpg
DELETED
|
Binary file (41 kB)
|
|
|
plant_photos/20260609_162158_055439.jpg
DELETED
|
Binary file (41 kB)
|
|
|
plant_photos/20260609_162201_673148.jpg
DELETED
|
Binary file (41 kB)
|
|
|
plant_photos/20260609_184909_739687.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_173521_694037.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_173832_451825.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_184152_772649.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_184300_312355.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_184812_582116.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_185223_963988.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_185859_130587.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_185940_276480.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_190129_605274.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_191055_616409.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_191439_122462.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_191724_892007.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_192329_954336.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_192436_518281.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_192851_612416.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_192903_546979.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_193204_148767.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_194841_632064.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_200651_986552.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|
plant_photos/20260610_211240_094893.jpg
DELETED
|
Binary file (53.4 kB)
|
|
|