Skip to content

Intelligent Environment for Extending Python Programming Knowledge via Self-learning and Providing Feedback from Trained sentence-transformer Models.

Notifications You must be signed in to change notification settings

xkrejc70/python-tutor

Repository files navigation

Python tutor

xkrejc70_poster

Flask Server with Nginx Load Balancer and ReactJS Client

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.

Deployment

Prerequisites

Make sure you have Docker and Docker Compose installed on your machine.

Deployment:

  1. Build and run containers:

    docker compose up -d --build

    This command builds the images, starts containers

  2. To stop and remove containers:

    docker compose down
  3. View running containers:

    docker ps

Development

For developing there is no need to use Docker.

Frontend

For client, it needs to change API_BASE_URL to LOCALHOST

To start client frontend, run:

npm install && npm start

Backend

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

Fine-tuning

  1. Edit config for fine-tuning in data/config.json

  2. Check laoding and format

python3 data/fine_tuning_data_validation.py
  1. Start fine-tuning
python3 data/fine_tuning.py

Convert yaml to jsonl:

python3 convert_yaml_to_jsonl.py train_data.yaml train_data.jsonl

About

Intelligent Environment for Extending Python Programming Knowledge via Self-learning and Providing Feedback from Trained sentence-transformer Models.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published