Create traffic accident forecast wia weather conditions in Moscow at north
- Flask
- joblib
An example of the config is in .env.example
, but to use it you need to use .env
The integration of the config from env into python variables is in ./shared/config.py
Before using it, it is necessary to load the .pkl
of trained models in ./models
and register them in ./models.json
.
You can get models in the traffic-accident-ml repository or download from Google Drive
Way without create .env
docker build -t traffic-accident-backend-ml --build-arg SERVER_HOST=<SERVER_HOST> --build-arg SERVER_PORT=<SERVER_PORT> --build-arg IS_PROD=<IS_PROD> .
Warning: don't forget to create .env
and add pkl models
docker build -t traffic-accident-backend-ml .
Run build container
docker run --name traffic-accident-backend-ml --restart=always -d -p 5000:5000 traffic-accident-backend-ml
> Python 3.10
- Install all libs from
requirements.txt
Install all dependencies
cd traffic-accident-backend-ml
pip install --no-cache-dir -r requirements.txt
Run python3 -m flask run --host=0.0.0.0