/Flood-App

Flood prediction app to forecast flood events with dynamic model loading

Primary LanguageJupyter Notebook

The project is divided into two parts:

  1. React frontend
  2. Flask server

React frontend

A fast and easy to use frontend build using ReactJS.

How to install?

  1. Prerequisites
  1. Clone the frontend repository
git clone https://github.com/akashlende/cdac-frontend.git
cd cdac-frontend`
  1. Install the dependencies
npm install

or

yarn
  1. Configure the backend Edit src/config.js for pointing to the flask server. If the frontend and backend are on the same machine leave this field to http://localhost:5000, else, change it to domain where server is hosted on.

  2. Once the dependencies are installed, run the code.

npm start

or

yarn start

How to build?

  1. Edit package.json. Set the value of homepage to address where you want to deploy the frontend. For example,
{
    "name": "cdac-flood-prediction",
    "version": "1.2.0",
    "homepage": "https://sample.com/flood-predict/",
    ...
    ...
  1. Create a production build
npm run-script build

or

yarn build

Voila! The production build is ready to be deployed. Production build is in build directory.

Flask Server

Multi-threaded flask server which features FBProphet and LDA at it's kernel to predict floods.

How to install?

  1. Prerequisites
  1. Clone the backend repository
git clone https://github.com/akashlende/cdac-backend.git
cd cdac-backend`
  1. Install dependencies
conda create --name <env_name> --file requirements.txt
  1. Activate the conda environment
conda activate <env_name>
  1. Run flask server Specify the port for the flask server to run on in file main.py. And then run the server.
python main.py

Teammates

Parag Ghorpade Akash Lende Aditya Gadge Hitesh Chordiya