Download setup.py from docsumo/sumoOCR-tiny: direct link, hf CLI and curl.
- Browser
- Download file 929 Bytes
-
https://huggingface.co/docsumo/sumoOCR-tiny/resolve/main/setup.py
- Command line
-
hf download hf://docsumo/sumoOCR-tiny/setup.py
-
curl -L -o setup.py https://huggingface.co/docsumo/sumoOCR-tiny/resolve/main/setup.py
929 Bytes
| """PyPI description = README.md without the Hugging Face model-card header, with repository links made absolute. | |
| Everything else is in pyproject.toml.""" | |
| import re | |
| from pathlib import Path | |
| from setuptools import setup | |
| REPO = "https://huggingface.co/docsumo/sumoOCR-tiny" | |
| def _absolute(m: "re.Match") -> str: | |
| image, label, target = m.group(1), m.group(2), m.group(3) | |
| kind = "resolve" if image else ("blob" if "." in target.rsplit("/", 1)[-1] else "tree") | |
| return f"{image}[{label}]({REPO}/{kind}/main/{target})" | |
| text = Path(__file__).with_name("README.md").read_text(encoding="utf-8") | |
| text = re.sub(r"\A---\n.*?\n---\n+", "", text, flags=re.S) | |
| text = re.sub(r"(!?)\[([^\]]*)\]\((?!https?://|#)([^)]+)\)", _absolute, text) | |
| setup( | |
| long_description=text, | |
| long_description_content_type="text/markdown", | |
| options={"sdist": {"owner": "root", "group": "root"}}, # no local user name in the source archive | |
| ) | |