A Regression Model to Optimize Crop Selection for Kenya’s Staple Food Farmers.
# SMART FARMING
## Table of Contents
- Introduction
- Installation
- Database Configuration
- Flask-Mail Setup
- Directory Structure
- Contributing
- License
## Introduction
The project runs a Machine learning model to suggest the most suitable crop based on the soil parameters that the user inputs. Additionally, the model is trained using the Logistic Regression algorithm. The ML model is deployed via a mobile application built with Flutter and Flask.
# Developer Manual (How to setup the system)
## Installation
1. Clone the repository:
```bash
git clone
github.com
```
2. Navigate to the project directory:
```bash
cd your-project
```
3. Create and activate a virtual environment:
```bash
python -m venv venv # Create a virtual environment
```
```bash
source venv/bin/activate # Activate on Linux or macOS
```
```bash
.\venv\Scripts\activate # Activate on Windows
```
4. Install dependencies:
```bash
pip install -r requirements.txt
```
5. Copy the .env.example to .env
```
cp .env.example .env
```
6. Run the secret.py file to generate the secrete key then copy and paste it to your environment file
```
python3 secret.py
```
Copy paste the secret key into you env file
Certainly! Here's the information formatted into a README:
---
# Database Configuration
## Environment Variables
These variables are used to configure the database connection for your Flask application.
- `DB_HOST`: Set the host address of your database server.
- `DB_USERNAME`: Specify the username for database access.
- `DB_PASSWORD`: Enter the password for the specified database user.
- `DB_NAME`: Name of the database to be connected.
## Flask-Migrate
Flask-Migrate is a Flask extension that handles SQLAlchemy database migrations. Once you have configured your database details in your environment variables or a configuration file, you can use Flask-Migrate to manage database changes, migrations, and updates.
To use Flask-Migrate:
1. **Initialize Mi …