I Built an Offline AI That Tells You What to Plant in One of the Hottest Climates on Earth π±
This is my submission for the Hacktoberfest 2026 Open-Source AI Challenge β Week 1: Touch Grass πΏ
The problem: "touching grass" is hard when the grass is 40Β°C
I live in Hadhramaut, Yemen, where summer temperatures routinely cross 40Β°C and gardening advice written for mild climates justβ¦ dies. Literally. I've watched well-meaning "plant tomatoes in spring!" tips kill more seedlings than they've saved, because here, the right question isn't just what to plant β it's what can survive my roof, my sun, my water, and my skill level.
So for this week's theme β build something with open-source AI that gets people off the screen and into the world β I built the Hadhramaut Garden Assistant: a Python tool that asks you five quick questions and recommends what to plant, powered by a real machine-learning model trained on plants that actually tolerate heat.
The screen is the shortest part of the experience. Five questions, one answer, then you go outside and plant mint on your roof. πΏ
What I built
A bilingual (Arabic/English) command-line assistant that:
- Asks about your conditions β planting month, daily sun hours, how often you can water, available space (a pot, a small bed, or open land), and your gardening experience level.
-
Runs a trained Decision Tree classifier (from the open-source
scikit-learnlibrary) to pick the best plant for you, with a confidence score and two alternatives. - Gives practical advice β harvest time in days and a tip per plant (e.g. mint: "plant it in its own pot β its roots will invade everything around it!").
The dataset covers 18 heat-tolerant plants β tomato, cucumber, okra, eggplant, pepper, mint, basil, parsley, coriander, radish, carrot, onion, garlic, lettuce, spinach, fenugreek, moringa, and aloe vera β each described by suitable planting months, sun, water, space, and difficulty.
Who it's for
Absolute beginners in hot climates β especially across the Arab world and the Gulf β who have a balcony, a rooftop, or a small plot and want to grow food but don't know where to start.
How it works (the open-source AI part)
No cloud API. No API keys. No internet required after installation β everything runs on your own laptop:
- Rule-based dataset generation: suitability rules are expanded into 972 labeled training examples.
-
Training: a
DecisionTreeClassifier(random_state=42)learns the suitability patterns from those examples. - Prediction: your five answers go through the model, which returns the best pick with a confidence score, plus the next two suitable alternatives.
Why open innovation matters here
- It runs with no internet. Where I live, connectivity and power aren't things you can take for granted. An offline, open model keeps working when a cloud service would be a loading spinner.
- It costs nothing. scikit-learn is free and open source.
- It's yours to change. Don't like my 18 plants? Add your own, retrain in seconds, done.
- Your data stays yours. Your location, your habits, your garden β none of it leaves your laptop.
Try it yourself
git clone https://github.com/amootasa/garden-assistant
cd garden-assistant
pip install scikit-learn
python3 garden_assistant.py
I took it outside π
I ran it on my Kali Linux machine β cloned the repo, installed scikit-learn, and answered the five questions with my real conditions. It recommended mint with 100% confidence, with basil and radish as backups. Honestly, mint was the best choice for October β perfect for someone who loves mint and uses it all the time in Hadhramaut β and now I have a pot of mint planted at the entrance of my house. ππΏ
What I learned
- How decision trees actually learn: turning domain knowledge into a generated dataset and letting the model discover the patterns.
- That input validation is a security habit, not just UX β every input is checked, because I'm an information security student and I refuse to ship an
eval()on user input. π - Writing the whole thing bilingual taught me that good developer UX crosses languages.
What's next
- More plants (dates and sidr trees are very Hadhramaut π΄)
- A simple phone-friendly version for gardeners who don't use laptops
- Letting users save their garden and track harvest dates
Links: GitHub repo Β· Built with scikit-learn (open source) Β· Submitted for #hf26challenge Week 1: Touch Grass
If you're a beginner gardener in a hot climate β try it, plant something, and tell me how it went. That's the whole point: the screen should be the shortest part. π±

Top comments (1)
You need to verify your account .
Link is in the profile.