File size: 556 Bytes
088e7fb
2913523
 
 
 
 
 
 
 
088e7fb
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
.PHONY: style format sync-requirements


style:
	uv run ruff check --fix .


quality:
	uv run ruff check .


# uv export cannot emit --extra-index-url from [tool.uv.sources] into
# requirements.txt (astral-sh/uv#13572, #10008 — "working as intended").
# HF Spaces only reads requirements.txt, so we regenerate via uv export and
# then splice the pytorch-cpu index back in.
sync-requirements:
	uv lock
	uv export --format requirements-txt --no-hashes -o requirements.txt
	sed -i '3i--extra-index-url https://download.pytorch.org/whl/cpu' requirements.txt