This project includes a Flask server, a Nginx load balancer, and a ReactJS client, all orchestrated using Docker Compose. The Flask server is served by Gunicorn, and Nginx acts as a load balancer to distribute requests. The ReactJS client communicates with the Flask API.
Make sure you have Docker and Docker Compose installed on your machine.
-
Build and run containers:
docker compose up -d --build
This command builds the images, starts containers
-
To stop and remove containers:
docker compose down
-
View running containers:
docker ps
For developing there is no need to use Docker.
For client, it needs to change API_BASE_URL
to LOCALHOST
To start client frontend, run:
npm install && npm start
To start flask servers, navigate to each server directory (/server/{falsk, model, test}
) and run:
pip install -r requirements.txt
flask run || python3 server/[servername]/[main_file].py
-
Edit config for fine-tuning in
data/config.json
-
Check laoding and format
python3 data/fine_tuning_data_validation.py
- Start fine-tuning
python3 data/fine_tuning.py
Convert yaml to jsonl:
python3 convert_yaml_to_jsonl.py train_data.yaml train_data.jsonl