Football Mixer

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.

Requirements for Client

  • Node.js
  • Yarn

Requirements for App

  • Python 3.9

Getting Client to work

Go to the 'client' folder and run the following commands:

yarn install

Start the app in development mode (hot-code reloading, error reporting, etc.)

yarn run dev

Build the app for production

yarn run build

Getting App to work

Initial setup

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

Install dependencies

To install the dependencies, run the following command:

python3.9 -m pip install -r requirements.txt

Start the app

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

Run backend with Docker

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

Usage with Postman

To use the API with Postman, you can import the following collection:

Run in Postman

You can also simply connect to http://localhost:5000/ and use the Swagger UI.

Authors