Stay focused!
Project description
eyefocus
Stay focused!
Built with:
- uv for project management.
- PyTorch for model training.
- Modal for model infra.
- FastHTML for the frontend.
- Ruff for linting and formatting.
Set Up
Set up the environment:
uv sync --all-extras --dev
uv run pre-commit install
Optionally, set up Modal:
modal setup
Repository Structure
.
├── frontend # landing page.
├── ft # classifier training.
├── src # pypi package.
Development
PyPI
Run locally:
uv run eyefocus -vv
Build the package:
uvx --from build pyproject-build --installer uv
Upload the package:
uvx twine upload dist/*
Test the uploaded package:
uv run --with eyefocus --no-project -- eyefocus -vv
Frontend
Run the app:
modal serve frontend/app.py
Deploy on Modal:
modal deploy frontend/app.py
Training
Optionally, manually collect screenshots:
uv run ft/collect.py
Run ETL on HF dataset (or collected screenshots if available):
uv run ft/etl.py
or
uv run modal run ft/etl.py
Train the model:
uv run torchrun --standalone --nproc_per_node=<n-gpus> ft/train.py
or
uv run modal run ft/train_modal.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
eyefocus-0.3.0.tar.gz
(185.2 kB
view hashes)
Built Distribution
eyefocus-0.3.0-py3-none-any.whl
(97.4 kB
view hashes)