Skip to content

spaceshark123/web-ml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

100 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Web ML

Small self-hosted web application for uploading datasets, training classical and neural-network models, visualizing training progress, and inspecting experiments.

Key pieces

Requirements

Quickstart — Backend

  1. Create and activate a virtual environment and install dependencies:
# bash
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
  1. Run the backend (includes Socket.IO):
# bash
python app.py

This will start the server on port 5050 by default. The Flask app and Socket.IO handlers are wired in backend/endpoints.py and extensions come from backend/extensions.py.

Quickstart — Frontend

  1. Install dependencies and run dev server:
# bash
cd frontend
npm install
npm run dev
  1. The frontend dev server (Vite) proxies /api to the backend using frontend/vite.config.ts.

Running tests

  • Frontend unit tests use Jest. From the frontend directory:
# bash
cd frontend
npm test
  • There are no automated backend tests included by default.

API highlights

  • Dataset endpoints and upload are implemented in backend/endpoints.py (e.g., /api/upload, /api/datasets).
  • Model train endpoint (non-MLP streaming/non-streaming) is at /api/train/<model_id> in backend/endpoints.py. For MLP streaming training the Socket.IO events (start_training, pause_training, resume_training, early_stop_training) are handled in the same file.
  • Model serialization and evaluation helper is ModelWrapper.

Development notes

Where to start when changing code

Reset / maintenance

  • To reset uploads and DB for a clean slate:
  • Stop the backend.
  • Remove instance/app.db and contents of uploads/.
  • Restart backend to recreate (some initialization logic runs on boot in backend/endpoints.py).

OR, send a POST request to the api/reset/both?key=supersecretresetkey endpoint

Help / debugging

  • Backend logs are printed to stdout when running python backend/app.py.
  • The frontend dev server prints proxy activity (see frontend/vite.config.ts configure hooks).
  • If Socket.IO connections fail in the browser, ensure the backend is reachable and socket.io-client version matches server compatibility.

Contributing

About

Web-based platform that allows users to apply a variety of machine learning models to selected datasets

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors