The project is divided into two parts:
A fast and easy to use frontend build using ReactJS.
- Prerequisites
- Clone the frontend repository
git clone https://github.com/akashlende/cdac-frontend.git
cd cdac-frontend`
- Install the dependencies
npm install
or
yarn
-
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 tohttp://localhost:5000
, else, change it to domain where server is hosted on. -
Once the dependencies are installed, run the code.
npm start
or
yarn start
- Edit
package.json
. Set the value ofhomepage
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/",
...
...
- 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.
Multi-threaded flask server which features FBProphet and LDA at it's kernel to predict floods.
- Prerequisites
- Clone the backend repository
git clone https://github.com/akashlende/cdac-backend.git
cd cdac-backend`
- Install dependencies
conda create --name <env_name> --file requirements.txt
- Activate the conda environment
conda activate <env_name>
- 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