# PyCS
[![pipeline status](https://gitlab.com/troebs/pycs/badges/master/pipeline.svg)](https://gitlab.com/troebs/pycs/-/commits/master)
[![coverage report](https://gitlab.com/troebs/pycs/badges/master/coverage.svg)](https://gitlab.com/troebs/pycs/-/commits/master)
[![made-with-python](https://img.shields.io/badge/Made%20with-Python-3c80ba.svg)](https://www.python.org/)
[![made-with-vuejs](https://img.shields.io/badge/Made%20with-Vue.js-62b45b.svg)](https://vuejs.org/)

PyCS is a python tool to use and fit machine learning models using any modern web browser.


## Requirements
- python 3.6 + pip
- nodejs 14 + npm


## Getting Started
### CI Builds
Download the [latest version](https://gitlab.com/troebs/pycs/-/jobs/artifacts/master/download?job=bundle) and unzip it. Execute the following commands using a command prompt:

- create and activate a virtual python environment
```bash
python -m venv env
source env/bin/activate
```

- install python dependencies
```bash
pip install numpy opencv-python Pillow scipy
pip install eventlet flask python-socketio
```

- start server
```bash
python app.py
```

### Docker
Docker is the preferred way to quickly start a PyCS instance without requiring any more software or libraries on your system.

- build image with tag `pycs`
```bash
docker build -t pycs .
```

- start container
```bash
docker run -p 5000:5000 pycs
```

### Development
Use `git` to clone this repository or download the [latest version as a zip file](https://gitlab.com/troebs/pycs/-/archive/master/pycs-master.zip). Execute the following commands using a command prompt:

- create and activate a virtual python environment
```bash
python -m venv env
source env/bin/activate
```

- install python dependencies
```bash
pip install numpy opencv-python Pillow scipy
pip install eventlet flask python-socketio
```

- start server
```bash
python app.py
```

- change directory to webui
```bash
cd webui/
```

- install vuejs and other dependencies
```bash
npm install
```

- start frontend
```bash
npm run serve
```
