A reverse proxy to mirror HuggingFace models and datasets on Cloudflare Workers.
-
Fork this repository.
-
Get an API key from Cloudflare and set it as a secret named
CLOUDFLARE_API_TOKEN
in your repository. -
Change name in the
wrangler.toml
file to use your own name for the worker. -
Add 3 custom domains to the workers, one starts with
cdn-lfs
, one starts withcdn-lfs-us-1
.3 domains would be like:
your.domain
cdn-lfs.your.domain
cdn-lfs-us-1.your.domain
Just set environment variable HF_ENDPOINT
to your custom domain, such as https://your.domain
.