Skip to content

smm2005/TerraHacks-2024

Repository files navigation

Fertility Prediction Model

Description

The fertility prediction model assesses and predicts trends in fertility over a selected country. The fertility prediction model evaluates the level of fertility based on soil quality, climate and the rainfall distribution of the land. Once the fertility prediction model makes it's assessment, then the fertility prediction model will provide solutions for future generations and possibly future governments so that they can take the most appropriate action.

Features

UI

  • Using the React library of JavaScript as well as JSX and CSS were used in the development and styling of the website template.
  • Home page
home_page.mp4
  • Model page
model_page.mp4
  • Solution page
solution_page.mp4

Back end

  • Using Express.js to communicate between the front-end and the database given the user input.
  • We also added the Hugging Face library in JavaScript to produce preventative solutions towards helping an area maintain it's current fertility.

Database

  • To store, retrieve and manipulate data, MySQL was used with both the front-end and the back-end code.

Instructions

Step 1: Clone the repository:

git clone https://github.com/smm2005/TerraHacks-2024.git

Step 2: Go to the main directory and create .env file

cd TeraHacks-2024
touch .env

Step 2.1: Complete the .env file

MYSQLDB_USER=
MYSQLDB_ROOT_PASSWORD=
MYSQLDB_LOCAL_PORT=
MYSQLDB_DOCKER_PORT=
MYSQLDB_DATABASES=
MYSQLDB_HOST=

REACT_APP_BACKEND_URL=

Step 3: Go to the backend directory and create secret-data.js file

cd backend
touch secret-data.js

Step 3.1: Complete the secret-data.js file

const default_user = "";
const default_password = "";
const default_database = "";
const default_host = "";
const HF_ACCESS_TOKEN = "";

module.exports = {
    default_database,
    default_host,
    default_password,
    default_user, 
    HF_ACCESS_TOKEN
}

NOTE: For the HF_ACCESS_TOKEN, it can be obtained from the Hugging Face if you want to use the Solution Feature

Step 4: Navigate back to the main project directory and start the docker compose:

docker compose up -d

Waiting for a few minutes and you can see the web page when go to localhost:3000

Step 5: To stop the docker containers, remove all created images and volumes, navigate back to the main project directory and run this code:

docker compose down --rmi all -v

DEVPOST

If you want further information, you can checkout our devpost

https://devpost.com/software/fertility-prediction-model

 Some Tools We Have Used and Learned In This Project

vscode bash

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •