https://github.com/xkrejc70/python-tutor
Intelligent Environment for Extending Python Programming Knowledge via Self-learning and Providing Feedback from Trained sentence-transformer Models.
https://github.com/xkrejc70/python-tutor
docker docker-compose flask intelligent-tutoring-system master-thesis reactjs
Last synced: 3 months ago
JSON representation
Intelligent Environment for Extending Python Programming Knowledge via Self-learning and Providing Feedback from Trained sentence-transformer Models.
- Host: GitHub
- URL: https://github.com/xkrejc70/python-tutor
- Owner: xkrejc70
- Created: 2023-11-12T08:51:28.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-23T12:25:36.000Z (about 2 years ago)
- Last Synced: 2025-03-16T14:50:22.877Z (over 1 year ago)
- Topics: docker, docker-compose, flask, intelligent-tutoring-system, master-thesis, reactjs
- Language: Python
- Homepage: https://www.vut.cz/en/students/final-thesis/detail/154307
- Size: 8.88 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python tutor

## 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:
2. Build and run containers:
```bash
docker compose up -d --build
```
This command builds the images, starts containers
3. To stop and remove containers:
```bash
docker compose down
```
4. View running containers:
```bash
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:
```bash
npm install && npm start
```
#### Backend
To start flask servers, navigate to each server directory (`/server/{falsk, model, test}`) and run:
```bash
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
```bash
python3 data/fine_tuning_data_validation.py
```
3. Start fine-tuning
```bash
python3 data/fine_tuning.py
```
Convert yaml to jsonl:
```bash
python3 convert_yaml_to_jsonl.py train_data.yaml train_data.jsonl
```