├── assets ├── icon.png ├── get-cookie.png ├── set-cookie.png ├── KwaiVGI-LivePortrait.png ├── datasets-rubenroy-cot.png ├── unsloth-DeepSeek-R1-GGUF.png ├── datasets-servicenow-r1sft-v1.png ├── unsloth-DeepSeek-R1-GGUF-BF16.png ├── result_6.json ├── result_3.json ├── result_9.json ├── result_5.json ├── result_2.json ├── result_8.json ├── result_4.json ├── result_1.json └── result_7.json ├── .prettierrc ├── babel.config.js ├── .github └── workflows │ └── ci.yml ├── .eslintrc ├── webpack.config.js ├── package.json ├── manifest.json ├── src ├── api │ ├── resolveBasePathParts.js │ ├── getMetaData.js │ ├── walkFiles.js │ └── prepare.js ├── index.js ├── utils │ └── fetchAndSave.js └── index.test.js ├── .gitignore ├── readme ├── README.zh-TW.md └── README.zh-CN.md ├── README.md ├── dist └── index.js └── jest.config.js /assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSYZayn/gopeed-extension-huggingface/HEAD/assets/icon.png -------------------------------------------------------------------------------- /assets/get-cookie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSYZayn/gopeed-extension-huggingface/HEAD/assets/get-cookie.png -------------------------------------------------------------------------------- /assets/set-cookie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSYZayn/gopeed-extension-huggingface/HEAD/assets/set-cookie.png -------------------------------------------------------------------------------- /assets/KwaiVGI-LivePortrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSYZayn/gopeed-extension-huggingface/HEAD/assets/KwaiVGI-LivePortrait.png -------------------------------------------------------------------------------- /assets/datasets-rubenroy-cot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSYZayn/gopeed-extension-huggingface/HEAD/assets/datasets-rubenroy-cot.png -------------------------------------------------------------------------------- /assets/unsloth-DeepSeek-R1-GGUF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSYZayn/gopeed-extension-huggingface/HEAD/assets/unsloth-DeepSeek-R1-GGUF.png -------------------------------------------------------------------------------- /assets/datasets-servicenow-r1sft-v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSYZayn/gopeed-extension-huggingface/HEAD/assets/datasets-servicenow-r1sft-v1.png -------------------------------------------------------------------------------- /assets/unsloth-DeepSeek-R1-GGUF-BF16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSYZayn/gopeed-extension-huggingface/HEAD/assets/unsloth-DeepSeek-R1-GGUF-BF16.png -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": true, 3 | "trailingComma": "es5", 4 | "singleQuote": true, 5 | "printWidth": 120, 6 | "tabWidth": 2, 7 | "endOfLine": "auto" 8 | } -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | presets: [ 3 | [ 4 | '@babel/preset-env', 5 | { 6 | exclude: ['transform-async-to-generator', 'transform-regenerator'], 7 | }, 8 | ], 9 | ], 10 | }; 11 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - '**/*' 7 | 8 | jobs: 9 | test: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: 检出代码 14 | uses: actions/checkout@v3 15 | 16 | - name: 设置Node.js环境 17 | uses: actions/setup-node@v3 18 | with: 19 | node-version: '18' 20 | 21 | - name: 安装依赖 22 | run: npm install 23 | 24 | - name: 运行测试 25 | run: npm test 26 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "ignorePatterns": ["node_modules/", "dist/"], 3 | "parserOptions": { 4 | "ecmaVersion": "latest", 5 | "sourceType": "module", 6 | }, 7 | "extends": ["eslint:recommended"], 8 | "plugins": ["prettier"], 9 | "rules": { 10 | "prettier/prettier": "error", 11 | "camelcase": "error", 12 | }, 13 | "env": { 14 | "browser": true, 15 | "es2021": true, 16 | "jest": true, 17 | }, 18 | "globals": { 19 | "gopeed": true, 20 | "MessageError": true, 21 | "process": true, 22 | "Promise": true, 23 | }, 24 | } 25 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | import path from 'path'; 2 | import { fileURLToPath } from 'url'; 3 | import GopeedPolyfillPlugin from 'gopeed-polyfill-webpack-plugin'; 4 | 5 | const __dirname = fileURLToPath(import.meta.url); 6 | 7 | export default (_, argv) => ({ 8 | entry: './src/index.js', 9 | output: { 10 | filename: 'index.js', 11 | path: path.resolve(__dirname, '../dist'), 12 | }, 13 | devtool: argv.mode === 'production' ? undefined : false, 14 | plugins: [new GopeedPolyfillPlugin()], 15 | module: { 16 | rules: [ 17 | { 18 | test: /\.m?js$/, 19 | use: { 20 | loader: 'babel-loader', 21 | }, 22 | }, 23 | ], 24 | }, 25 | }); 26 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gopeed-extention-huggingface", 3 | "version": "1.0.0", 4 | "private": false, 5 | "description": "", 6 | "main": "index.js", 7 | "type": "module", 8 | "scripts": { 9 | "test": "node --experimental-vm-modules --trace-warnings node_modules/jest/bin/jest.js", 10 | "dev": "webpack --mode development --watch", 11 | "build": "webpack --mode production" 12 | }, 13 | "keywords": [], 14 | "author": "", 15 | "license": "ISC", 16 | "devDependencies": { 17 | "@babel/core": "^7.22.20", 18 | "@babel/preset-env": "^7.22.20", 19 | "babel-loader": "^9.1.3", 20 | "eslint": "^8.51.0", 21 | "eslint-config-prettier": "^9.0.0", 22 | "eslint-plugin-prettier": "^5.0.0", 23 | "gopeed": "^1.6.1", 24 | "gopeed-polyfill-webpack-plugin": "^1.0.6", 25 | "jest": "^29.7.0", 26 | "prettier": "^3.0.3", 27 | "webpack": "^5.75.0", 28 | "webpack-cli": "^5.0.1" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gopeed-extention-huggingface", 3 | "author": "zayn", 4 | "title": "Huggingface下载", 5 | "description": "支持Huggingface模型、数据集的文件夹解析下载, 可自由替换 Huggingface下载地址\n使用方法请看主页", 6 | "icon": "./assets/icon.png", 7 | "version": "1.0.8", 8 | "homepage": "https://github.com/DSYZayn/gopeed-extension-huggingface", 9 | "repository": { 10 | "url": "https://github.com/DSYZayn/gopeed-extension-huggingface" 11 | }, 12 | "scripts": [ 13 | { 14 | "event": "onResolve", 15 | "match": { 16 | "urls": ["*://huggingface.co/*", "*://hf-mirror.com/*", "*://www.modelscope.cn/*", "*://alpha.hf-mirror.com/*"] 17 | }, 18 | "entry": "dist/index.js" 19 | } 20 | ], 21 | "settings": [ 22 | { 23 | "name": "cookie", 24 | "title": "Huggingface Cookie", 25 | "description": "Some Huggingface models require login to download, you can paste your cookie here", 26 | "type": "string" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /src/api/resolveBasePathParts.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 解析basePathParts 3 | * 4 | * @param {string []} pathParts 5 | * @returns {string [], string} basePathParts, filepath 6 | */ 7 | export default function resolveBasePathParts(pathParts) { 8 | let filePath = ''; 9 | /** 10 | * 构建basePathParts 11 | * @param {string} pathParts 12 | * @returns {[string, string]} [basePath, filepath] 13 | */ 14 | const basePathParts = (pathParts) => { 15 | if (pathParts.length === 0) return []; 16 | if (pathParts[pathParts.length - 2] === 'tree') { 17 | return pathParts; 18 | } 19 | gopeed.logger.debug('basePathParts:', pathParts); 20 | filePath = filePath === '' ? pathParts.pop() : pathParts.pop() + '/' + filePath; 21 | gopeed.logger.debug('function basePathParts--filepath:', filePath); 22 | return basePathParts(pathParts); 23 | }; 24 | 25 | const basePath = basePathParts(pathParts).join('/').replace('master', 'main'); 26 | 27 | return [basePath, filePath]; 28 | } 29 | -------------------------------------------------------------------------------- /src/api/getMetaData.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 获取模型元数据 || Get Model Metadata 3 | * @param {string} basePath - 基础路径. e.g. models/KwaiVGI/LivePortrait/tree/main, 4 | * @param {string} filepath - 文件路径. e.g. insightface/models/buffalo_l 5 | * @returns {Promise} 6 | */ 7 | export default async function getMetaData(basePath, filepath) { 8 | gopeed.logger.debug('basePath:', basePath, 'filepath:', filepath); 9 | const path = filepath ? `${basePath}/${filepath}` : basePath; 10 | // hf-mirror或huggingface.co 11 | const apiPath = `https://hf-mirror.com/api/${path}`; 12 | gopeed.logger.debug('apiPath:', apiPath, 'path:', path); 13 | const resp = await fetch(apiPath, { 14 | headers: { Accept: 'application/json' }, 15 | }); 16 | if (!resp.ok) throw new Error(`Failed to fetch ${apiPath}`); 17 | const data = await resp.json(); 18 | const result = await Promise.all( 19 | data.map(async (item) => { 20 | if (item.type === 'directory') return await getMetaData(basePath, item.path); 21 | return item; 22 | }) 23 | ); 24 | return result.flat(Infinity); 25 | } 26 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: zayn dongsy2003@163.com 3 | * @Date: 2025-02-04 02:34:49 4 | * @LastEditors: zayn dongsy2003@163.com 5 | * @LastEditTime: 2025-03-12 13:43:56 6 | * @FilePath: \gopeed-extension-huggingface\src\index.js 7 | * @Description: 入口文件 8 | */ 9 | import prepare from './api/prepare.js'; 10 | import resolveBasePathParts from './api/resolveBasePathParts.js'; 11 | import getMetaData from './api/getMetaData.js'; 12 | import walkFiles from './api/walkFiles.js'; 13 | 14 | gopeed.events.onResolve(async function (ctx) { 15 | try { 16 | let url = new URL(ctx.req.url); // e.g. https://hf-mirror.com/unsloth/DeepSeek-R1-GGUF/tree/main/DeepSeek-R1-UD-IQ1_M 17 | 18 | const { baseUrl, user, repo, branch, protocol, port, pathParts } = prepare(url); 19 | 20 | const [basePath, filePath] = resolveBasePathParts(pathParts); 21 | 22 | const data = await getMetaData(basePath, filePath); 23 | ctx.res = { 24 | name: user, 25 | files: walkFiles(data, branch, basePath, protocol, baseUrl, port, repo), 26 | }; 27 | gopeed.logger.debug('ctx.res:', JSON.stringify(ctx.res)); 28 | } catch (err) { 29 | gopeed.logger.error('[HF Parser]', err); 30 | ctx.res = { 31 | name: 'Error', 32 | files: [], 33 | }; 34 | } 35 | }); 36 | -------------------------------------------------------------------------------- /src/api/walkFiles.js: -------------------------------------------------------------------------------- 1 | /** 整理文件列表 2 | * @param {string} path 3 | * @param {string} branch 4 | * @param {import('@gopeed/types').FileInfo[]} data 5 | * @param {string} protocol 6 | * @param {string} baseUrl 7 | * @param {string} port 8 | * @returns {import('@gopeed/types').FileInfo[]} 9 | * */ 10 | export default function walkFiles(data, branch, path, protocol, baseUrl, port, repo) { 11 | if (data === undefined || data === null) { 12 | gopeed.logger.debug('walkFiles: data is undefined or null'); 13 | return []; 14 | } 15 | gopeed.logger.debug('walkFiles: data is not undefined or null'); 16 | return data.map((item) => { 17 | gopeed.logger.debug('item.path:', item.path); 18 | let aPath = path.replace('tree', 'resolve').replace('main', `${branch}`); 19 | if (branch == 'main' && path.includes('models')) { 20 | aPath = aPath.replace('models/', ''); 21 | } 22 | let name = item.path; 23 | let bPath = ''; 24 | if (name.includes('/')) { 25 | name = item.path.split('/'); 26 | bPath = '/' + name.slice(0, -1).join('/'); 27 | name = name[name.length - 1]; 28 | } 29 | 30 | // e.g. aPath = /models/unsloth/DeepSeek-R1-GGUF/tree/main/DeepSeek-R1-UD-IQ1_M and bPath = /DeepSeek-R1-UD-IQ1_M 31 | // aPath = aPath.replace(bPath, ''); // 去除bPath, 但aPath可能存在与bPath重复的字符串 32 | aPath = aPath.replace(new RegExp(`${bPath}(?!.*${bPath})`, 'g'), ''); // 只删除最后一个与bPath相同的字符串 33 | gopeed.logger.debug('aPath:', aPath); 34 | gopeed.logger.debug('name:', name); 35 | gopeed.logger.debug('bPath:', bPath); 36 | return { 37 | name: name, 38 | path: `${repo}${bPath}`, 39 | size: item.size, 40 | req: { 41 | url: `${protocol}//${baseUrl}:${port}/${aPath}${bPath}/${name}`, 42 | extra: { 43 | header: { 44 | Cookie: gopeed.settings.cookie, 45 | }, 46 | }, 47 | }, 48 | }; 49 | }); 50 | } 51 | -------------------------------------------------------------------------------- /src/api/prepare.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: zayn dongsy2003@163.com 3 | * @Date: 2025-03-12 12:35:49 4 | * @LastEditors: zayn dongsy2003@163.com 5 | * @LastEditTime: 2025-03-12 12:50:42 6 | * @FilePath: \gopeed-extension-huggingface\src\api\prepare.js 7 | * @Description: 8 | * 9 | */ 10 | 11 | /** 12 | * Prepares the necessary information for accessing a repository based on the provided URL. 13 | * This function is designed to parse the URL and extract user, repository, branch, and other information required for accessing the repository. 14 | * @param {URL} url - The URL object containing the address of the repository. 15 | * @returns {Object} Returns an object containing baseUrl, user, repo, branch, protocol, port, and pathParts. 16 | */ 17 | export default function prepare(url) { 18 | // 构造API请求地址(兼容基础域名) 19 | // 由于modelscope缺乏高效的元信息获取API,统一使用hf-mirror来获取元信息 20 | // 因此暂时只支持下载modelscope中与hf-mirror同名的数据 21 | const baseUrl = url.host; // e.g. hf-mirror.com 22 | const branch = baseUrl === 'www.modelscope.cn' ? 'master' : 'main'; 23 | const protocol = url.protocol; // Generally https: or http: 24 | const port = url.port || (protocol === 'https:' ? 443 : 80); // Explicit port for https: or http:, default 80 for http:, 443 for https: 25 | let pathParts = url.pathname.substring(1).split('/'); //e.g. [unsloth, DeepSeek-R1-GGUF, tree, main, DeepSeek-R1-UD-IQ1_M] 26 | if (pathParts.includes('resolve') || pathParts.includes('spaces')) { 27 | return; // 不解析单文件 || Don't resolve single file. 28 | } 29 | if (pathParts[pathParts.length - 1] === '') { 30 | pathParts.pop(); 31 | } 32 | if (pathParts[0] != 'models' && pathParts[0] != 'datasets' && pathParts[0] != 'spaces') { 33 | pathParts = ['models', ...pathParts]; // 补齐路径:models/ || Complete path: models/ 34 | } 35 | 36 | const [user, repo] = pathParts.slice(1, 3); 37 | if (pathParts.length === 3) { 38 | // 补齐路径: /models/tree/main 39 | pathParts = [...pathParts, 'tree', 'main']; 40 | } 41 | gopeed.logger.debug('user:', user, 'repo:', repo); 42 | 43 | return { baseUrl, user, repo, branch, protocol, port, pathParts }; 44 | } 45 | -------------------------------------------------------------------------------- /assets/result_6.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zaynchen", 3 | "files": [ 4 | { 5 | "name": "__init__.py", 6 | "path": "gopeed-extension-huggingface/mock-repo/models/model1", 7 | "size": 265, 8 | "req": { 9 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model1/__init__.py", 10 | "extra": { 11 | "header": {} 12 | } 13 | } 14 | }, 15 | { 16 | "name": "model1.py", 17 | "path": "gopeed-extension-huggingface/mock-repo/models/model1", 18 | "size": 414, 19 | "req": { 20 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model1/model1.py", 21 | "extra": { 22 | "header": {} 23 | } 24 | } 25 | }, 26 | { 27 | "name": "model1_config.json", 28 | "path": "gopeed-extension-huggingface/mock-repo/models/model1", 29 | "size": 111, 30 | "req": { 31 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model1/model1_config.json", 32 | "extra": { 33 | "header": {} 34 | } 35 | } 36 | }, 37 | { 38 | "name": "__init__.py", 39 | "path": "gopeed-extension-huggingface/mock-repo/models/model2", 40 | "size": 265, 41 | "req": { 42 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model2/__init__.py", 43 | "extra": { 44 | "header": {} 45 | } 46 | } 47 | }, 48 | { 49 | "name": "model2.py", 50 | "path": "gopeed-extension-huggingface/mock-repo/models/model2", 51 | "size": 414, 52 | "req": { 53 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model2/model2.py", 54 | "extra": { 55 | "header": {} 56 | } 57 | } 58 | }, 59 | { 60 | "name": "model2_config.json", 61 | "path": "gopeed-extension-huggingface/mock-repo/models/model2", 62 | "size": 117, 63 | "req": { 64 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model2/model2_config.json", 65 | "extra": { 66 | "header": {} 67 | } 68 | } 69 | } 70 | ] 71 | } -------------------------------------------------------------------------------- /assets/result_3.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zaynchen", 3 | "files": [ 4 | { 5 | "name": "__init__.py", 6 | "path": "gopeed-extension-huggingface/mock-repo/models/model1", 7 | "size": 265, 8 | "req": { 9 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model1/__init__.py", 10 | "extra": { 11 | "header": {} 12 | } 13 | } 14 | }, 15 | { 16 | "name": "model1.py", 17 | "path": "gopeed-extension-huggingface/mock-repo/models/model1", 18 | "size": 414, 19 | "req": { 20 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model1/model1.py", 21 | "extra": { 22 | "header": {} 23 | } 24 | } 25 | }, 26 | { 27 | "name": "model1_config.json", 28 | "path": "gopeed-extension-huggingface/mock-repo/models/model1", 29 | "size": 111, 30 | "req": { 31 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model1/model1_config.json", 32 | "extra": { 33 | "header": {} 34 | } 35 | } 36 | }, 37 | { 38 | "name": "__init__.py", 39 | "path": "gopeed-extension-huggingface/mock-repo/models/model2", 40 | "size": 265, 41 | "req": { 42 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model2/__init__.py", 43 | "extra": { 44 | "header": {} 45 | } 46 | } 47 | }, 48 | { 49 | "name": "model2.py", 50 | "path": "gopeed-extension-huggingface/mock-repo/models/model2", 51 | "size": 414, 52 | "req": { 53 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model2/model2.py", 54 | "extra": { 55 | "header": {} 56 | } 57 | } 58 | }, 59 | { 60 | "name": "model2_config.json", 61 | "path": "gopeed-extension-huggingface/mock-repo/models/model2", 62 | "size": 117, 63 | "req": { 64 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model2/model2_config.json", 65 | "extra": { 66 | "header": {} 67 | } 68 | } 69 | } 70 | ] 71 | } -------------------------------------------------------------------------------- /assets/result_9.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zaynchen", 3 | "files": [ 4 | { 5 | "name": "__init__.py", 6 | "path": "gopeed-extension-huggingface/mock-repo/models/model1", 7 | "size": 265, 8 | "req": { 9 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model1/__init__.py", 10 | "extra": { 11 | "header": {} 12 | } 13 | } 14 | }, 15 | { 16 | "name": "model1.py", 17 | "path": "gopeed-extension-huggingface/mock-repo/models/model1", 18 | "size": 414, 19 | "req": { 20 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model1/model1.py", 21 | "extra": { 22 | "header": {} 23 | } 24 | } 25 | }, 26 | { 27 | "name": "model1_config.json", 28 | "path": "gopeed-extension-huggingface/mock-repo/models/model1", 29 | "size": 111, 30 | "req": { 31 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model1/model1_config.json", 32 | "extra": { 33 | "header": {} 34 | } 35 | } 36 | }, 37 | { 38 | "name": "__init__.py", 39 | "path": "gopeed-extension-huggingface/mock-repo/models/model2", 40 | "size": 265, 41 | "req": { 42 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model2/__init__.py", 43 | "extra": { 44 | "header": {} 45 | } 46 | } 47 | }, 48 | { 49 | "name": "model2.py", 50 | "path": "gopeed-extension-huggingface/mock-repo/models/model2", 51 | "size": 414, 52 | "req": { 53 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model2/model2.py", 54 | "extra": { 55 | "header": {} 56 | } 57 | } 58 | }, 59 | { 60 | "name": "model2_config.json", 61 | "path": "gopeed-extension-huggingface/mock-repo/models/model2", 62 | "size": 117, 63 | "req": { 64 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model2/model2_config.json", 65 | "extra": { 66 | "header": {} 67 | } 68 | } 69 | } 70 | ] 71 | } -------------------------------------------------------------------------------- /src/utils/fetchAndSave.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: zayn dongsy2003@163.com 3 | * @Date: 2025-03-12 13:30:00 4 | * @LastEditors: zayn dongsy2003@163.com 5 | * @LastEditTime: 2025-03-12 13:40:28 6 | * @FilePath: \gopeed-extension-huggingface\src\fetchAndSave.js 7 | * @Description: 模拟调用 src/index.js 中的逻辑并保存结果, 本地使用 node 运行此脚本,并将所有涉及gopeed的内容注释掉 8 | */ 9 | 10 | import prepare from '../api/prepare.js'; 11 | import resolveBasePathParts from '../api/resolveBasePathParts.js'; 12 | import getMetaData from '../api/getMetaData.js'; 13 | import walkFiles from '../api/walkFiles.js'; 14 | import fs from 'fs'; 15 | 16 | /* eslint-disable no-undef */ 17 | global.gopeed = { 18 | logger: { 19 | debug: () => {}, 20 | }, 21 | settings: { 22 | cookie: undefined, 23 | }, 24 | }; 25 | async function fetchAndSave(url, outputPath) { 26 | try { 27 | let urlObj = new URL(url); 28 | 29 | const { baseUrl, user, repo, branch, protocol, port, pathParts } = prepare(urlObj); 30 | 31 | const [basePath, filePath] = resolveBasePathParts(pathParts); 32 | 33 | const data = await getMetaData(basePath, filePath); 34 | const result = { 35 | name: user, 36 | files: walkFiles(data, branch, basePath, protocol, baseUrl, port, repo), 37 | }; 38 | 39 | fs.writeFileSync(outputPath, JSON.stringify(result, null, 2)); 40 | console.log(`Result saved to ${outputPath}`); 41 | } catch (err) { 42 | console.error('[HF Parser]', err); 43 | } 44 | } 45 | 46 | // 示例调用 47 | const links = [ 48 | 'https://huggingface.co/zaynchen/gopeed-extension-huggingface/tree/main', 49 | 'https://huggingface.co/zaynchen/gopeed-extension-huggingface/tree/main/mock-repo', 50 | 'https://huggingface.co/zaynchen/gopeed-extension-huggingface/tree/main/mock-repo/models', 51 | 'https://hf-mirror.com/zaynchen/gopeed-extension-huggingface/tree/main', 52 | 'https://hf-mirror.com/zaynchen/gopeed-extension-huggingface/tree/main/mock-repo', 53 | 'https://hf-mirror.com/zaynchen/gopeed-extension-huggingface/tree/main/mock-repo/models', 54 | 'https://alpha.hf-mirror.com/zaynchen/gopeed-extension-huggingface/tree/main', 55 | 'https://alpha.hf-mirror.com/zaynchen/gopeed-extension-huggingface/tree/main/mock-repo', 56 | 'https://alpha.hf-mirror.com/zaynchen/gopeed-extension-huggingface/tree/main/mock-repo/models', 57 | ]; 58 | links.forEach((link, index) => { 59 | const outputPath = `assets/result_${index + 1}.json`; 60 | fetchAndSave(link, outputPath); 61 | }); 62 | -------------------------------------------------------------------------------- /src/index.test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: zayn dongsy2003@163.com 3 | * @Date: 2025-03-12 13:44:00 4 | * @LastEditors: zayn dongsy2003@163.com 5 | * @LastEditTime: 2025-03-12 14:23:46 6 | * @FilePath: \gopeed-extension-huggingface\src\index.test.js 7 | * @Description: 单元测试文件 8 | */ 9 | import { readFile } from 'fs/promises'; 10 | import { describe, it, expect, jest } from '@jest/globals'; 11 | import prepare from './api/prepare.js'; 12 | import resolveBasePathParts from './api/resolveBasePathParts.js'; 13 | import getMetaData from './api/getMetaData.js'; 14 | import walkFiles from './api/walkFiles.js'; 15 | 16 | /* eslint-disable no-undef */ 17 | global.gopeed = { 18 | events: { 19 | onResolve: jest.fn(), 20 | }, 21 | logger: { 22 | info: jest.fn(), 23 | error: jest.fn(), 24 | debug: jest.fn(), 25 | }, 26 | settings: jest.fn(), 27 | }; 28 | 29 | describe('gopeed.events.onResolve', () => { 30 | const links = [ 31 | 'https://huggingface.co/zaynchen/gopeed-extension-huggingface/tree/main', 32 | 'https://huggingface.co/zaynchen/gopeed-extension-huggingface/tree/main/mock-repo', 33 | 'https://huggingface.co/zaynchen/gopeed-extension-huggingface/tree/main/mock-repo/models', 34 | 'https://hf-mirror.com/zaynchen/gopeed-extension-huggingface/tree/main', 35 | 'https://hf-mirror.com/zaynchen/gopeed-extension-huggingface/tree/main/mock-repo', 36 | 'https://hf-mirror.com/zaynchen/gopeed-extension-huggingface/tree/main/mock-repo/models', 37 | 'https://alpha.hf-mirror.com/zaynchen/gopeed-extension-huggingface/tree/main', 38 | 'https://alpha.hf-mirror.com/zaynchen/gopeed-extension-huggingface/tree/main/mock-repo', 39 | 'https://alpha.hf-mirror.com/zaynchen/gopeed-extension-huggingface/tree/main/mock-repo/models', 40 | ]; 41 | 42 | links.forEach((link, index) => { 43 | it(`should return the correct response for link ${link}`, async () => { 44 | const url = new URL(link); 45 | const { baseUrl, user, repo, branch, protocol, port, pathParts } = prepare(url); 46 | 47 | const [basePath, filePath] = resolveBasePathParts(pathParts); 48 | 49 | const data = await getMetaData(basePath, filePath); 50 | const result = { 51 | name: user, 52 | files: walkFiles(data, branch, basePath, protocol, baseUrl, port, repo), 53 | }; 54 | const expectedFilePath = `../assets/result_${index + 1}.json`; 55 | const expectedResult = JSON.parse(await readFile(new URL(expectedFilePath, import.meta.url))); 56 | 57 | expect(result).toEqual(expectedResult); 58 | }, 30000); 59 | }); 60 | }); 61 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | .pnpm-debug.log* 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # Directory for instrumented libs generated by jscoverage/JSCover 20 | lib-cov 21 | 22 | # Coverage directory used by tools like istanbul 23 | coverage 24 | *.lcov 25 | 26 | # nyc test coverage 27 | .nyc_output 28 | 29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 30 | .grunt 31 | 32 | # Bower dependency directory (https://bower.io/) 33 | bower_components 34 | 35 | # node-waf configuration 36 | .lock-wscript 37 | 38 | # Compiled binary addons (https://nodejs.org/api/addons.html) 39 | build/Release 40 | 41 | # Dependency directories 42 | node_modules/ 43 | jspm_packages/ 44 | 45 | # Snowpack dependency directory (https://snowpack.dev/) 46 | web_modules/ 47 | 48 | # TypeScript cache 49 | *.tsbuildinfo 50 | 51 | # Optional npm cache directory 52 | .npm 53 | 54 | # Optional eslint cache 55 | .eslintcache 56 | 57 | # Optional stylelint cache 58 | .stylelintcache 59 | 60 | # Microbundle cache 61 | .rpt2_cache/ 62 | .rts2_cache_cjs/ 63 | .rts2_cache_es/ 64 | .rts2_cache_umd/ 65 | 66 | # Optional REPL history 67 | .node_repl_history 68 | 69 | # Output of 'npm pack' 70 | *.tgz 71 | 72 | # Yarn Integrity file 73 | .yarn-integrity 74 | 75 | # dotenv environment variable files 76 | .env 77 | .env.development.local 78 | .env.test.local 79 | .env.production.local 80 | .env.local 81 | 82 | # parcel-bundler cache (https://parceljs.org/) 83 | .cache 84 | .parcel-cache 85 | 86 | # Next.js build output 87 | .next 88 | out 89 | 90 | # Nuxt.js build / generate output 91 | .nuxt 92 | 93 | # Gatsby files 94 | .cache/ 95 | # Comment in the public line in if your project uses Gatsby and not Next.js 96 | # https://nextjs.org/blog/next-9-1#public-directory-support 97 | # public 98 | 99 | # vuepress build output 100 | .vuepress/dist 101 | 102 | # vuepress v2.x temp and cache directory 103 | .temp 104 | .cache 105 | 106 | # Docusaurus cache and generated files 107 | .docusaurus 108 | 109 | # Serverless directories 110 | .serverless/ 111 | 112 | # FuseBox cache 113 | .fusebox/ 114 | 115 | # DynamoDB Local files 116 | .dynamodb/ 117 | 118 | # TernJS port file 119 | .tern-port 120 | 121 | # Stores VSCode versions used for testing VSCode extensions 122 | .vscode-test 123 | 124 | # yarn v2 125 | .yarn/cache 126 | .yarn/unplugged 127 | .yarn/build-state.yml 128 | .yarn/install-state.gz 129 | .pnp.* -------------------------------------------------------------------------------- /readme/README.zh-TW.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | # Gopeed Extension Huggingface 12 | 13 | [簡體中文](readme/README.zh-CN.md) | [繁體中文](readme/README.zh-TW.md) | [English](readme/README.md) 14 | 15 | ## 功能 16 | 17 | - ✅ 支援Huggingface的模型和數據集整個資料夾解析 18 | - ✅ 支援解析huggingface.co || hf-mirror.com || www.modelscope.cn 上同名的模型和數據集, 並自由指定來源站 19 | - ✅ 支援遞歸解析,並自動建立資料夾 20 | - ✅ 支援設定Cookie以便下載Gated Repo 21 | - ... 22 | 23 | ## 安裝 24 | 25 | 在插件頁面輸入`https://github.com/DSYZayn/gopeed-extension-huggingface.git`下載即可安裝 26 | 27 | ## 使用 28 | 29 | 滿足以下格式的連結即可**解析該資料夾下所有檔案** 30 | 31 | `https://////tree/main/` 32 | 33 | - **baseUrl**: huggingface.co || hf-mirror.com || www.modelscope.cn 34 | - **user**: 使用者名稱(組織名稱), 如deepseek-ai 35 | - **repoType**: models || datasets 36 | - **path**: 資料夾路徑, 如果是根目錄則不填, 連同`main/`最後的`/`一起去掉 37 | 38 | - 🔴 若要使用modelscope, 則需要該模型或數據集在huggingface中存在,否則無法解析。(modelscope缺少高效簡潔的倉庫元資訊API介面,如確有需要的歡迎PR) 39 | - ❗ 對於倉庫內的單檔案,則直接輸入你手動獲取的連結即可, 本插件對單檔案不做任何解析。 40 | - 🤷‍♂️ 解析時間與目錄深度和檔案數量有關,通常在3秒內可以完成大部分解析。 41 | 42 | ### Cookie 設定 43 | 44 | 部分模型需要登入才能下載(Gated Repo),這種情況下需要設定cookie,否則會出現`401`下載失敗,設定方法如下: 45 | 46 | 1. 獲取cookie,打開瀏覽器,登入`huggingface.co`,按`F12`打開開發者工具,切換到`Network`選項卡,重新整理頁面,找到`https://huggingface.co`的請求,複製`Cookie`欄位的值 47 | ![get-cookie](../assets/get-cookie.png) 48 | 49 | 2. 在擴充功能設定中填入cookie 50 | ![set-cookie](../assets/set-cookie.png) 51 | 52 | ### 範例 53 | 54 | > 使用hf-mirror或modelscope下載則替換 `huggingface.co` 為 `hf-mirror.com` 或 `www.modelscope.cn`, 參考 `baseUrl` 55 | 56 | 1. 下載unsloth/DeepSeek-R1-GGUF的根目錄檔案:`https://huggingface.co/models/unsloth/DeepSeek-R1-GGUF/tree/main` 57 | 2. 下載unsloth/DeepSeek-R1-GGUF的`Deepseek-R1-BF16`資料夾:`https://huggingface.co/models/unsloth/DeepSeek-R1-GGUF/tree/main/Deepseek-R1-BF16` 58 | 59 | 小技巧: 以上兩個連結中`models/`可以省略 60 | 61 | 1. 下載open-thoughts/OpenThoughts-114k的根目錄檔案:`https://huggingface.co/datasets/open-thoughts/OpenThoughts-114k/tree/main` 62 | 2. 下載open-thoughts/OpenThoughts-114k的`data`資料夾:`https://huggingface.co/datasets/open-thoughts/OpenThoughts-114k/tree/main/data` 63 | 64 | 小技巧: 以上兩個連結中`datasets/`絕對不能省略 65 | 66 | ## 示範 67 | 68 | 69 | 70 | 1. Input `https://hf-mirror.com/models/unsloth/DeepSeek-R1-GGUF/tree/main` 71 | 72 | ![unsloth-DeepSeek-R1-GGUF](../assets/unsloth-DeepSeek-R1-GGUF.png) 73 | 74 | 2. Input `https://hf-mirror.com/unsloth/DeepSeek-R1-GGUF/tree/main/DeepSeek-R1-BF16` 75 | 76 | ![unsloth-DeepSeek-R1-GGUF-BF16](../assets/unsloth-DeepSeek-R1-GGUF-BF16.png) 77 | 78 | 3. Input `https://hf-mirror.com/datasets/rubenroy/GammaCorpus-CoT-Math-170k/tree/main` 79 | 80 | ![datasets-rubenroy-cot](../assets/datasets-rubenroy-cot.png) 81 | 82 | 4. Input `https://hf-mirror.com/datasets/ServiceNow-AI/R1-Distill-SFT/tree/main/v1` 83 | 84 | ![datasets-servicenow-r1sft-v1](../assets/datasets-servicenow-r1sft-v1.png) 85 | 86 | 5. Input `https://huggingface.co/KwaiVGI/LivePortrait/tree/main` 87 | 88 | ![KwaiVGI-LivePortrait](../assets/KwaiVGI-LivePortrait.png) 89 | 90 | 91 | 92 | ## Star 歷史 93 | 94 | [![Star 歷史圖表](https://api.star-history.com/svg?repos=DSYZayn/gopeed-extension-huggingface&type=Date)](https://star-history.com/#DSYZayn/gopeed-extension-huggingface&Date) 95 | -------------------------------------------------------------------------------- /readme/README.zh-CN.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | # Gopeed Extension Huggingface 12 | 13 | [简体中文](readme/README.zh-CN.md) | [繁体中文](readme/README.zh-TW.md) | [English](readme/README.md) 14 | 15 | ## 特性 16 | 17 | - ✅ 支持Huggingface的模型和数据集整个文件夹解析 18 | - ✅ 支持解析huggingface.co || hf-mirror.com || www.modelscope.cn 上同名的模型和数据集, 并自由指定源站 19 | - ✅ 支持递归解析,并自动创建文件夹 20 | - ✅ 支持设置Cookie以便下载Gated Repo 21 | - ... 22 | 23 | ## 安装 24 | 25 | 在插件页面输入`https://github.com/DSYZayn/gopeed-extension-huggingface.git`下载即可安装 26 | 27 | ## 使用 28 | 29 | 满足以下格式的链接即可**解析该文件夹下所有文件** 30 | 31 | `https://////tree/main/` 32 | 33 | - **baseUrl**: huggingface.co || hf-mirror.com || www.modelscope.cn 34 | - **user**: 用户名(组织名), 如deepseek-ai 35 | - **repoType**: models || datasets 36 | - **path**: 文件夹路径, 如果是根目录则不填, 连同`main/`最后的`/`一起去掉 37 | 38 | - 🔴 若要使用modelscope, 则需要该模型或数据集在huggingface中存在,否则无法解析。(modelscope缺少高效简洁的仓库元信息API接口,如确有需要的欢迎PR) 39 | - ❗ 对于仓库内的单文件,则直接输入你手动获取的链接即可, 本插件不对单文件进行任何解析。 40 | - 🤷‍♂️ 解析用时与目录深度和文件数量有关,通常在3s内可以完成大部分解析。 41 | 42 | ### Cookie 设置 43 | 44 | 部分模型需要登录才能下载(Gated Repo),这种情况下需要配置cookie,否则会出现`401`下载失败,配置方法如下: 45 | 46 | 1. 获取cookie,打开浏览器,登录`huggingface.co`,按`F12`打开开发者工具,切换到`Network`选项卡,刷新页面,找到`https://huggingface.co`的请求,复制`Cookie`字段的值 47 | ![get-cookie](../assets/get-cookie.png) 48 | 49 | 2. 在扩展设置中填入cookie 50 | ![set-cookie](../assets/set-cookie.png) 51 | 52 | ### 范例 53 | 54 | > 使用hf-mirror或modelscope下载则替换 `huggingface.co` 为 `hf-mirror.com` 或 `www.modelscope.cn`, 参考 `baseUrl` 55 | 56 | 1. 下载unsloth/DeepSeek-R1-GGUF的根目录文件:`https://huggingface.co/models/unsloth/DeepSeek-R1-GGUF/tree/main` 57 | 2. 下载unsloth/DeepSeek-R1-GGUF的`Deepseek-R1-BF16`文件夹:`https://huggingface.co/models/unsloth/DeepSeek-R1-GGUF/tree/main/Deepseek-R1-BF16` 58 | 59 | tips: 以上两个链接中`models/`可以省略 60 | 61 | 1. 下载open-thoughts/OpenThoughts-114k的根目录文件:`https://huggingface.co/datasets/open-thoughts/OpenThoughts-114k/tree/main` 62 | 2. 下载open-thoughts/OpenThoughts-114k的`data`文件夹:`https://huggingface.co/datasets/open-thoughts/OpenThoughts-114k/tree/main/data` 63 | 64 | tips: 以上两个链接中`datasets/`绝对不能省略 65 | 66 | ## 案例 67 | 68 | 69 | 70 | 1. Input `https://hf-mirror.com/models/unsloth/DeepSeek-R1-GGUF/tree/main` 71 | 72 | ![unsloth-DeepSeek-R1-GGUF](../assets/unsloth-DeepSeek-R1-GGUF.png) 73 | 74 | 2. Input `https://hf-mirror.com/unsloth/DeepSeek-R1-GGUF/tree/main/DeepSeek-R1-BF16` 75 | 76 | ![unsloth-DeepSeek-R1-GGUF-BF16](../assets/unsloth-DeepSeek-R1-GGUF-BF16.png) 77 | 78 | 3. Input `https://hf-mirror.com/datasets/rubenroy/GammaCorpus-CoT-Math-170k/tree/main` 79 | 80 | ![datasets-rubenroy-cot](../assets/datasets-rubenroy-cot.png) 81 | 82 | 4. Input `https://hf-mirror.com/datasets/ServiceNow-AI/R1-Distill-SFT/tree/main/v1` 83 | 84 | ![datasets-servicenow-r1sft-v1](../assets/datasets-servicenow-r1sft-v1.png) 85 | 86 | 5. Input `https://huggingface.co/KwaiVGI/LivePortrait/tree/main` 87 | 88 | ![KwaiVGI-LivePortrait](../assets/KwaiVGI-LivePortrait.png) 89 | 90 | 91 | 92 | ## 项目趋势 93 | 94 | [![Star History Chart](https://api.star-history.com/svg?repos=DSYZayn/gopeed-extension-huggingface&type=Date)](https://star-history.com/#DSYZayn/gopeed-extension-huggingface&Date) 95 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | # Gopeed Extension Huggingface 12 | 13 | [简体中文](readme/README.zh-CN.md) | [繁体中文](readme/README.zh-TW.md) | [English](README.md) 14 | 15 | ## Features 16 | 17 | - ✅ Supports parsing entire folders of Huggingface models and datasets 18 | - ✅ Supports parsing models and datasets with the same name on huggingface.co || hf-mirror.com || www.modelscope.cn, and freely specifying the source station 19 | - ✅ Supports recursive parsing and automatically creates folders 20 | - ✅ Supports setting Cookie to download Gated Repo 21 | - ... 22 | 23 | ## Installation 24 | 25 | Enter `https://github.com/DSYZayn/gopeed-extension-huggingface.git` on the plugin page to download and install 26 | 27 | ## Usage 28 | 29 | Links in the following format can **parse all files in the folder** 30 | 31 | `https://////tree/main/` 32 | 33 | - **baseUrl**: huggingface.co || hf-mirror.com || www.modelscope.cn 34 | - **user**: username (organization name), e.g., deepseek-ai 35 | - **repoType**: models || datasets 36 | - **path**: folder path, leave blank if it is the root directory, remove the `/` at the end of `main/` 37 | 38 | - 🔴 If using modelscope, the model or dataset must exist on huggingface, otherwise it cannot be parsed. (modelscope lacks an efficient and concise repository metadata API interface, welcome PR if needed) 39 | - ❗ For individual files within a repository, enter the link you manually obtained, this plugin does not parse individual files. 40 | - 🤷‍♂️ Parsing time depends on the depth of the directory and the number of files, typically completing most parsing within 3 seconds. 41 | 42 | ### Cookie Configuration 43 | 44 | Some models require login to download (Gated Repo), in which case you need to configure the cookie, otherwise a `401` download failure will occur. The configuration method is as follows: 45 | 46 | 1. Get the cookie, open the browser, log in to `huggingface.co`, press `F12` to open the developer tools, switch to the `Network` tab, refresh the page, find the `https://huggingface.co` request, copy the value of the `Cookie` field 47 | ![get-cookie](assets/get-cookie.png) 48 | 49 | 2. Enter the cookie in the extension settings 50 | ![set-cookie](assets/set-cookie.png) 51 | 52 | ### Example 53 | 54 | > To download using hf-mirror or modelscope, replace `huggingface.co` with `hf-mirror.com` or `www.modelscope.cn`, refer to `baseUrl` 55 | 56 | 1. Download the root folder files of unsloth/DeepSeek-R1-GGUF: `https://huggingface.co/models/unsloth/DeepSeek-R1-GGUF/tree/main` 57 | 2. Download the Deepseek-R1-BF16 folder of unsloth/DeepSeek-R1-GGUF: `https://huggingface.co/models/unsloth/DeepSeek-R1-GGUF/tree/main/Deepseek-R1-BF16` 58 | 59 | tip: The `models/` in the above two links can be omitted 60 | 61 | 1. Download the root folder files of open-thoughts/OpenThoughts-114k: `https://huggingface.co/datasets/open-thoughts/OpenThoughts-114k/tree/main` 62 | 2. Download the data folder of open-thoughts/OpenThoughts-114k: `https://huggingface.co/datasets/open-thoughts/OpenThoughts-114k/tree/main/data` 63 | 64 | tip: The `datasets/` in the above two links must not be omitted 65 | 66 | ## Demo 67 | 68 | 69 | 70 | 1. Input `https://hf-mirror.com/models/unsloth/DeepSeek-R1-GGUF/tree/main` 71 | 72 | ![unsloth-DeepSeek-R1-GGUF](assets/unsloth-DeepSeek-R1-GGUF.png) 73 | 74 | 2. Input `https://hf-mirror.com/unsloth/DeepSeek-R1-GGUF/tree/main/DeepSeek-R1-BF16` 75 | 76 | ![unsloth-DeepSeek-R1-GGUF-BF16](assets/unsloth-DeepSeek-R1-GGUF-BF16.png) 77 | 78 | 3. Input `https://hf-mirror.com/datasets/rubenroy/GammaCorpus-CoT-Math-170k/tree/main` 79 | 80 | ![datasets-rubenroy-cot](assets/datasets-rubenroy-cot.png) 81 | 82 | 4. Input `https://hf-mirror.com/datasets/ServiceNow-AI/R1-Distill-SFT/tree/main/v1` 83 | 84 | ![datasets-servicenow-r1sft-v1](assets/datasets-servicenow-r1sft-v1.png) 85 | 86 | 5. Input `https://huggingface.co/KwaiVGI/LivePortrait/tree/main` 87 | 88 | ![KwaiVGI-LivePortrait](assets/KwaiVGI-LivePortrait.png) 89 | 90 | 91 | 92 | ## Star History 93 | 94 | [![Star History Chart](https://api.star-history.com/svg?repos=DSYZayn/gopeed-extension-huggingface&type=Date)](https://star-history.com/#DSYZayn/gopeed-extension-huggingface&Date) 95 | -------------------------------------------------------------------------------- /dist/index.js: -------------------------------------------------------------------------------- 1 | (()=>{"use strict";function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||r(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,r){if(e){if("string"==typeof e)return t(e,r);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}function t(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);te.length)&&(r=e.length);for(var t=0,n=Array(r);t" 121 | // ], 122 | 123 | // Allows you to use a custom runner instead of Jest's default test runner 124 | // runner: "jest-runner", 125 | 126 | // The paths to modules that run some code to configure or set up the testing environment before each test 127 | // setupFiles: [], 128 | 129 | // A list of paths to modules that run some code to configure or set up the testing framework before each test 130 | // setupFilesAfterEnv: [], 131 | 132 | // The number of seconds after which a test is considered as slow and reported as such in the results. 133 | // slowTestThreshold: 5, 134 | 135 | // A list of paths to snapshot serializer modules Jest should use for snapshot testing 136 | // snapshotSerializers: [], 137 | 138 | // The test environment that will be used for testing 139 | testEnvironment: 'node', 140 | 141 | // Options that will be passed to the testEnvironment 142 | // testEnvironmentOptions: {}, 143 | 144 | // Adds a location field to test results 145 | // testLocationInResults: false, 146 | 147 | // The glob patterns Jest uses to detect test files 148 | testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)'], 149 | 150 | // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped 151 | // testPathIgnorePatterns: [ 152 | // "\\\\node_modules\\\\" 153 | // ], 154 | 155 | // The regexp pattern or array of patterns that Jest uses to detect test files 156 | // testRegex: [], 157 | 158 | // This option allows the use of a custom results processor 159 | // testResultsProcessor: undefined, 160 | 161 | // This option allows use of a custom test runner 162 | // testRunner: "jest-circus/runner", 163 | 164 | // A map from regular expressions to paths to transformers 165 | transform: {}, 166 | 167 | // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation 168 | transformIgnorePatterns: ['\\\\node_modules\\\\', '\\.pnp\\.[^\\\\]+$'], 169 | 170 | // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them 171 | // unmockedModulePathPatterns: undefined, 172 | 173 | // Indicates whether each individual test should be reported during the run 174 | verbose: true, 175 | 176 | // An array of regexp pattern strings that are matched against all source file paths before re-running tests in watch mode 177 | // watchPathIgnorePatterns: [], 178 | 179 | // Whether to use watchman for file crawling 180 | // watchman: true, 181 | }; 182 | 183 | export default config; 184 | -------------------------------------------------------------------------------- /assets/result_4.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zaynchen", 3 | "files": [ 4 | { 5 | "name": "dataset1.csv", 6 | "path": "gopeed-extension-huggingface/mock-repo/datasets/dataset1", 7 | "size": 25, 8 | "req": { 9 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/datasets/dataset1/dataset1.csv", 10 | "extra": { 11 | "header": {} 12 | } 13 | } 14 | }, 15 | { 16 | "name": "dataset1_info.json", 17 | "path": "gopeed-extension-huggingface/mock-repo/datasets/dataset1", 18 | "size": 115, 19 | "req": { 20 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/datasets/dataset1/dataset1_info.json", 21 | "extra": { 22 | "header": {} 23 | } 24 | } 25 | }, 26 | { 27 | "name": "dataset2.csv", 28 | "path": "gopeed-extension-huggingface/mock-repo/datasets/dataset2", 29 | "size": 25, 30 | "req": { 31 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/datasets/dataset2/dataset2.csv", 32 | "extra": { 33 | "header": {} 34 | } 35 | } 36 | }, 37 | { 38 | "name": "dataset2_info.json", 39 | "path": "gopeed-extension-huggingface/mock-repo/datasets/dataset2", 40 | "size": 121, 41 | "req": { 42 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/datasets/dataset2/dataset2_info.json", 43 | "extra": { 44 | "header": {} 45 | } 46 | } 47 | }, 48 | { 49 | "name": "__init__.py", 50 | "path": "gopeed-extension-huggingface/mock-repo/models/model1", 51 | "size": 265, 52 | "req": { 53 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model1/__init__.py", 54 | "extra": { 55 | "header": {} 56 | } 57 | } 58 | }, 59 | { 60 | "name": "model1.py", 61 | "path": "gopeed-extension-huggingface/mock-repo/models/model1", 62 | "size": 414, 63 | "req": { 64 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model1/model1.py", 65 | "extra": { 66 | "header": {} 67 | } 68 | } 69 | }, 70 | { 71 | "name": "model1_config.json", 72 | "path": "gopeed-extension-huggingface/mock-repo/models/model1", 73 | "size": 111, 74 | "req": { 75 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model1/model1_config.json", 76 | "extra": { 77 | "header": {} 78 | } 79 | } 80 | }, 81 | { 82 | "name": "__init__.py", 83 | "path": "gopeed-extension-huggingface/mock-repo/models/model2", 84 | "size": 265, 85 | "req": { 86 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model2/__init__.py", 87 | "extra": { 88 | "header": {} 89 | } 90 | } 91 | }, 92 | { 93 | "name": "model2.py", 94 | "path": "gopeed-extension-huggingface/mock-repo/models/model2", 95 | "size": 414, 96 | "req": { 97 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model2/model2.py", 98 | "extra": { 99 | "header": {} 100 | } 101 | } 102 | }, 103 | { 104 | "name": "model2_config.json", 105 | "path": "gopeed-extension-huggingface/mock-repo/models/model2", 106 | "size": 117, 107 | "req": { 108 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model2/model2_config.json", 109 | "extra": { 110 | "header": {} 111 | } 112 | } 113 | }, 114 | { 115 | "name": "__init__.py", 116 | "path": "gopeed-extension-huggingface/mock-repo/tests", 117 | "size": 303, 118 | "req": { 119 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/tests/__init__.py", 120 | "extra": { 121 | "header": {} 122 | } 123 | } 124 | }, 125 | { 126 | "name": "test_model1.py", 127 | "path": "gopeed-extension-huggingface/mock-repo/tests", 128 | "size": 601, 129 | "req": { 130 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/tests/test_model1.py", 131 | "extra": { 132 | "header": {} 133 | } 134 | } 135 | }, 136 | { 137 | "name": "test_model2.py", 138 | "path": "gopeed-extension-huggingface/mock-repo/tests", 139 | "size": 601, 140 | "req": { 141 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/tests/test_model2.py", 142 | "extra": { 143 | "header": {} 144 | } 145 | } 146 | }, 147 | { 148 | "name": "__init__.py", 149 | "path": "gopeed-extension-huggingface/mock-repo/utils", 150 | "size": 276, 151 | "req": { 152 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/utils/__init__.py", 153 | "extra": { 154 | "header": {} 155 | } 156 | } 157 | }, 158 | { 159 | "name": "helpers.py", 160 | "path": "gopeed-extension-huggingface/mock-repo/utils", 161 | "size": 481, 162 | "req": { 163 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/utils/helpers.py", 164 | "extra": { 165 | "header": {} 166 | } 167 | } 168 | }, 169 | { 170 | "name": "LICENSE", 171 | "path": "gopeed-extension-huggingface/mock-repo", 172 | "size": 1087, 173 | "req": { 174 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/LICENSE", 175 | "extra": { 176 | "header": {} 177 | } 178 | } 179 | }, 180 | { 181 | "name": "README.md", 182 | "path": "gopeed-extension-huggingface/mock-repo", 183 | "size": 80, 184 | "req": { 185 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/README.md", 186 | "extra": { 187 | "header": {} 188 | } 189 | } 190 | }, 191 | { 192 | "name": ".gitattributes", 193 | "path": "gopeed-extension-huggingface", 194 | "size": 1519, 195 | "req": { 196 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/.gitattributes", 197 | "extra": { 198 | "header": {} 199 | } 200 | } 201 | }, 202 | { 203 | "name": "README.md", 204 | "path": "gopeed-extension-huggingface", 205 | "size": 24, 206 | "req": { 207 | "url": "https://hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/README.md", 208 | "extra": { 209 | "header": {} 210 | } 211 | } 212 | } 213 | ] 214 | } -------------------------------------------------------------------------------- /assets/result_1.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zaynchen", 3 | "files": [ 4 | { 5 | "name": "dataset1.csv", 6 | "path": "gopeed-extension-huggingface/mock-repo/datasets/dataset1", 7 | "size": 25, 8 | "req": { 9 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/datasets/dataset1/dataset1.csv", 10 | "extra": { 11 | "header": {} 12 | } 13 | } 14 | }, 15 | { 16 | "name": "dataset1_info.json", 17 | "path": "gopeed-extension-huggingface/mock-repo/datasets/dataset1", 18 | "size": 115, 19 | "req": { 20 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/datasets/dataset1/dataset1_info.json", 21 | "extra": { 22 | "header": {} 23 | } 24 | } 25 | }, 26 | { 27 | "name": "dataset2.csv", 28 | "path": "gopeed-extension-huggingface/mock-repo/datasets/dataset2", 29 | "size": 25, 30 | "req": { 31 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/datasets/dataset2/dataset2.csv", 32 | "extra": { 33 | "header": {} 34 | } 35 | } 36 | }, 37 | { 38 | "name": "dataset2_info.json", 39 | "path": "gopeed-extension-huggingface/mock-repo/datasets/dataset2", 40 | "size": 121, 41 | "req": { 42 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/datasets/dataset2/dataset2_info.json", 43 | "extra": { 44 | "header": {} 45 | } 46 | } 47 | }, 48 | { 49 | "name": "__init__.py", 50 | "path": "gopeed-extension-huggingface/mock-repo/models/model1", 51 | "size": 265, 52 | "req": { 53 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model1/__init__.py", 54 | "extra": { 55 | "header": {} 56 | } 57 | } 58 | }, 59 | { 60 | "name": "model1.py", 61 | "path": "gopeed-extension-huggingface/mock-repo/models/model1", 62 | "size": 414, 63 | "req": { 64 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model1/model1.py", 65 | "extra": { 66 | "header": {} 67 | } 68 | } 69 | }, 70 | { 71 | "name": "model1_config.json", 72 | "path": "gopeed-extension-huggingface/mock-repo/models/model1", 73 | "size": 111, 74 | "req": { 75 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model1/model1_config.json", 76 | "extra": { 77 | "header": {} 78 | } 79 | } 80 | }, 81 | { 82 | "name": "__init__.py", 83 | "path": "gopeed-extension-huggingface/mock-repo/models/model2", 84 | "size": 265, 85 | "req": { 86 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model2/__init__.py", 87 | "extra": { 88 | "header": {} 89 | } 90 | } 91 | }, 92 | { 93 | "name": "model2.py", 94 | "path": "gopeed-extension-huggingface/mock-repo/models/model2", 95 | "size": 414, 96 | "req": { 97 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model2/model2.py", 98 | "extra": { 99 | "header": {} 100 | } 101 | } 102 | }, 103 | { 104 | "name": "model2_config.json", 105 | "path": "gopeed-extension-huggingface/mock-repo/models/model2", 106 | "size": 117, 107 | "req": { 108 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model2/model2_config.json", 109 | "extra": { 110 | "header": {} 111 | } 112 | } 113 | }, 114 | { 115 | "name": "__init__.py", 116 | "path": "gopeed-extension-huggingface/mock-repo/tests", 117 | "size": 303, 118 | "req": { 119 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/tests/__init__.py", 120 | "extra": { 121 | "header": {} 122 | } 123 | } 124 | }, 125 | { 126 | "name": "test_model1.py", 127 | "path": "gopeed-extension-huggingface/mock-repo/tests", 128 | "size": 601, 129 | "req": { 130 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/tests/test_model1.py", 131 | "extra": { 132 | "header": {} 133 | } 134 | } 135 | }, 136 | { 137 | "name": "test_model2.py", 138 | "path": "gopeed-extension-huggingface/mock-repo/tests", 139 | "size": 601, 140 | "req": { 141 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/tests/test_model2.py", 142 | "extra": { 143 | "header": {} 144 | } 145 | } 146 | }, 147 | { 148 | "name": "__init__.py", 149 | "path": "gopeed-extension-huggingface/mock-repo/utils", 150 | "size": 276, 151 | "req": { 152 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/utils/__init__.py", 153 | "extra": { 154 | "header": {} 155 | } 156 | } 157 | }, 158 | { 159 | "name": "helpers.py", 160 | "path": "gopeed-extension-huggingface/mock-repo/utils", 161 | "size": 481, 162 | "req": { 163 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/utils/helpers.py", 164 | "extra": { 165 | "header": {} 166 | } 167 | } 168 | }, 169 | { 170 | "name": "LICENSE", 171 | "path": "gopeed-extension-huggingface/mock-repo", 172 | "size": 1087, 173 | "req": { 174 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/LICENSE", 175 | "extra": { 176 | "header": {} 177 | } 178 | } 179 | }, 180 | { 181 | "name": "README.md", 182 | "path": "gopeed-extension-huggingface/mock-repo", 183 | "size": 80, 184 | "req": { 185 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/README.md", 186 | "extra": { 187 | "header": {} 188 | } 189 | } 190 | }, 191 | { 192 | "name": ".gitattributes", 193 | "path": "gopeed-extension-huggingface", 194 | "size": 1519, 195 | "req": { 196 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/.gitattributes", 197 | "extra": { 198 | "header": {} 199 | } 200 | } 201 | }, 202 | { 203 | "name": "README.md", 204 | "path": "gopeed-extension-huggingface", 205 | "size": 24, 206 | "req": { 207 | "url": "https://huggingface.co:443/zaynchen/gopeed-extension-huggingface/resolve/main/README.md", 208 | "extra": { 209 | "header": {} 210 | } 211 | } 212 | } 213 | ] 214 | } -------------------------------------------------------------------------------- /assets/result_7.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zaynchen", 3 | "files": [ 4 | { 5 | "name": "dataset1.csv", 6 | "path": "gopeed-extension-huggingface/mock-repo/datasets/dataset1", 7 | "size": 25, 8 | "req": { 9 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/datasets/dataset1/dataset1.csv", 10 | "extra": { 11 | "header": {} 12 | } 13 | } 14 | }, 15 | { 16 | "name": "dataset1_info.json", 17 | "path": "gopeed-extension-huggingface/mock-repo/datasets/dataset1", 18 | "size": 115, 19 | "req": { 20 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/datasets/dataset1/dataset1_info.json", 21 | "extra": { 22 | "header": {} 23 | } 24 | } 25 | }, 26 | { 27 | "name": "dataset2.csv", 28 | "path": "gopeed-extension-huggingface/mock-repo/datasets/dataset2", 29 | "size": 25, 30 | "req": { 31 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/datasets/dataset2/dataset2.csv", 32 | "extra": { 33 | "header": {} 34 | } 35 | } 36 | }, 37 | { 38 | "name": "dataset2_info.json", 39 | "path": "gopeed-extension-huggingface/mock-repo/datasets/dataset2", 40 | "size": 121, 41 | "req": { 42 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/datasets/dataset2/dataset2_info.json", 43 | "extra": { 44 | "header": {} 45 | } 46 | } 47 | }, 48 | { 49 | "name": "__init__.py", 50 | "path": "gopeed-extension-huggingface/mock-repo/models/model1", 51 | "size": 265, 52 | "req": { 53 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model1/__init__.py", 54 | "extra": { 55 | "header": {} 56 | } 57 | } 58 | }, 59 | { 60 | "name": "model1.py", 61 | "path": "gopeed-extension-huggingface/mock-repo/models/model1", 62 | "size": 414, 63 | "req": { 64 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model1/model1.py", 65 | "extra": { 66 | "header": {} 67 | } 68 | } 69 | }, 70 | { 71 | "name": "model1_config.json", 72 | "path": "gopeed-extension-huggingface/mock-repo/models/model1", 73 | "size": 111, 74 | "req": { 75 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model1/model1_config.json", 76 | "extra": { 77 | "header": {} 78 | } 79 | } 80 | }, 81 | { 82 | "name": "__init__.py", 83 | "path": "gopeed-extension-huggingface/mock-repo/models/model2", 84 | "size": 265, 85 | "req": { 86 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model2/__init__.py", 87 | "extra": { 88 | "header": {} 89 | } 90 | } 91 | }, 92 | { 93 | "name": "model2.py", 94 | "path": "gopeed-extension-huggingface/mock-repo/models/model2", 95 | "size": 414, 96 | "req": { 97 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model2/model2.py", 98 | "extra": { 99 | "header": {} 100 | } 101 | } 102 | }, 103 | { 104 | "name": "model2_config.json", 105 | "path": "gopeed-extension-huggingface/mock-repo/models/model2", 106 | "size": 117, 107 | "req": { 108 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/models/model2/model2_config.json", 109 | "extra": { 110 | "header": {} 111 | } 112 | } 113 | }, 114 | { 115 | "name": "__init__.py", 116 | "path": "gopeed-extension-huggingface/mock-repo/tests", 117 | "size": 303, 118 | "req": { 119 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/tests/__init__.py", 120 | "extra": { 121 | "header": {} 122 | } 123 | } 124 | }, 125 | { 126 | "name": "test_model1.py", 127 | "path": "gopeed-extension-huggingface/mock-repo/tests", 128 | "size": 601, 129 | "req": { 130 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/tests/test_model1.py", 131 | "extra": { 132 | "header": {} 133 | } 134 | } 135 | }, 136 | { 137 | "name": "test_model2.py", 138 | "path": "gopeed-extension-huggingface/mock-repo/tests", 139 | "size": 601, 140 | "req": { 141 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/tests/test_model2.py", 142 | "extra": { 143 | "header": {} 144 | } 145 | } 146 | }, 147 | { 148 | "name": "__init__.py", 149 | "path": "gopeed-extension-huggingface/mock-repo/utils", 150 | "size": 276, 151 | "req": { 152 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/utils/__init__.py", 153 | "extra": { 154 | "header": {} 155 | } 156 | } 157 | }, 158 | { 159 | "name": "helpers.py", 160 | "path": "gopeed-extension-huggingface/mock-repo/utils", 161 | "size": 481, 162 | "req": { 163 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/utils/helpers.py", 164 | "extra": { 165 | "header": {} 166 | } 167 | } 168 | }, 169 | { 170 | "name": "LICENSE", 171 | "path": "gopeed-extension-huggingface/mock-repo", 172 | "size": 1087, 173 | "req": { 174 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/LICENSE", 175 | "extra": { 176 | "header": {} 177 | } 178 | } 179 | }, 180 | { 181 | "name": "README.md", 182 | "path": "gopeed-extension-huggingface/mock-repo", 183 | "size": 80, 184 | "req": { 185 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/mock-repo/README.md", 186 | "extra": { 187 | "header": {} 188 | } 189 | } 190 | }, 191 | { 192 | "name": ".gitattributes", 193 | "path": "gopeed-extension-huggingface", 194 | "size": 1519, 195 | "req": { 196 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/.gitattributes", 197 | "extra": { 198 | "header": {} 199 | } 200 | } 201 | }, 202 | { 203 | "name": "README.md", 204 | "path": "gopeed-extension-huggingface", 205 | "size": 24, 206 | "req": { 207 | "url": "https://alpha.hf-mirror.com:443/zaynchen/gopeed-extension-huggingface/resolve/main/README.md", 208 | "extra": { 209 | "header": {} 210 | } 211 | } 212 | } 213 | ] 214 | } --------------------------------------------------------------------------------