|
Download README.md from qitianhh/node: direct link, hf CLI and curl.
- Browser
- Download file 1.67 kB
-
https://huggingface.co/spaces/qitianhh/node/resolve/main/README.md
- Command line
-
hf download hf://spaces/qitianhh/node/README.md
-
curl -L -o README.md https://huggingface.co/spaces/qitianhh/node/resolve/main/README.md
1.67 kB
metadata
license: apache-2.0
title: hh
sdk: docker
emoji: 📚
colorFrom: indigo
colorTo: indigo
pinned: false
short_description: '5555555'
sdk_version: 1.49.1
说明
下方为默认UUID,可自行添加环境变量修改
25bef25c-cbe4-431b-93b6-b39aa11c0a7e
部署
https://huggingface.co 注册账号,新建space,名称随意,选择docker,空白项目,选择public公开项目,上传文件,除了README.md,其他文件都上传。 修改start.sh里的哪吒参数,不需要哪吒可忽略,自动部署。
获取域名
域名形式:用户名-项目名.hf.space,例如我的用户名为aaa,项目名为bbb,那么域名为:aaa-bbb.hf.space。或者通过下图直接查看域名
节点配置如下
可以利用cf的workers套cdn加速配合优选ip或优选域名使用,反代代码如下,替换第6行中的地址。
export default {
async fetch(request, env) {
let url = new URL(request.url);
if (url.pathname.startsWith('/')) {
var arrStr = [
'aaaa.bbbbb.hf.space',
];
url.protocol = 'https:'
url.hostname = getRandomArray(arrStr)
let new_request = new Request(url, request);
return fetch(new_request);
}
return env.ASSETS.fetch(request);
},
};
function getRandomArray(array) {
const randomIndex = Math.floor(Math.random() * array.length);
return array[randomIndex];
}