A project made at InHolland University of Applied Sciences for the Big Data & AI minor.
The 'app' folder contains a Python project that uses the Flask framework to create a REST API, which interacts with a ML model that analyses microphone data input to determine the sounds of a football match.
The 'client' folder contains a Quasar project that uses Vue.js to interact with the REST API.
- Node.js
- Yarn
- Python 3.9
Go to the 'client' folder and run the following commands:
yarn install
yarn run dev
yarn run build
For the initial setup, you need a virtual environment. To create one, run the following commands:
python3 -m venv .venv
I HIGHLY recommend modifying the .venv/bin/activate
file to include the following line at the end:
export FLASK_APP=manage.py
This will automatically set the FLASK_APP
environment variable every time you activate the virtual environment, so you don't have to do it manually every time.
To activate the virtual environment, run the following command:
source .venv/bin/activate
To install the dependencies, run the following command:
python3.9 -m pip install -r requirements.txt
To start the app, run the following command:
python3.9 -m flask run
For hot-reloading, you can use the following command:
python3.9 -m flask --debug run
go in the app folder:
cd app
build the image:
docker compose build
run the docker container with this (with watch for hot-reloading):
docker compose up --watch
To use the API with Postman, you can import the following collection:
You can also simply connect to http://localhost:5000/ and use the Swagger UI.