# geoap-hf-space — common tasks PY ?= python DET_DATA ?= ../artifacts/tiled_detection/data.yaml SEG_DATA ?= ../artifacts/tiled_segmentation/data.yaml .PHONY: help install run train-det train-seg export push deploy check clean help: @echo "install pip install -r requirements.txt" @echo "run launch the Gradio app locally on :7860" @echo "train-det fine-tune yolo26m on DET_DATA" @echo "train-seg fine-tune yolo26m-seg on SEG_DATA" @echo "export export both tasks to ONNX" @echo "push push both model repos to the HF Hub" @echo "deploy create/update the HF Space" @echo "check import + config sanity check" install: $(PY) -m pip install -r requirements.txt run: $(PY) app.py train-det: $(PY) scripts/finetune_yolo26.py --task detect --data $(DET_DATA) train-seg: $(PY) scripts/finetune_yolo26.py --task segment --data $(SEG_DATA) export: $(PY) scripts/export_onnx.py --task detect --format onnx $(PY) scripts/export_onnx.py --task segment --format onnx push: $(PY) scripts/push_models_to_hub.py --both deploy: $(PY) scripts/deploy_space.py check: $(PY) -c "from src.settings import load_settings; s=load_settings(); \ print('classes:', s.detection_classes, s.segmentation_classes); \ print('space:', s.hub.space_repo)" $(PY) -c "import src.inference, src.viz, src.tiling, src.model_loader; print('imports ok')" clean: rm -rf __pycache__ src/__pycache__ scripts/__pycache__ .gradio flagged