{ // 获取包含Hugging Face文本的span元素 const spans = link.querySelectorAll('span.whitespace-nowrap, span.hidden.whitespace-nowrap'); spans.forEach(span => { if (span.textContent && span.textContent.trim().match(/Hugging\s*Face/i)) { span.textContent = 'AI快站'; } }); }); // 替换logo图片的alt属性 document.querySelectorAll('img[alt*="Hugging"], img[alt*="Face"]').forEach(img => { if (img.alt.match(/Hugging\s*Face/i)) { img.alt = 'AI快站 logo'; } }); } // 替换导航栏中的链接 function replaceNavigationLinks() { // 已替换标记,防止重复运行 if (window._navLinksReplaced) { return; } // 已经替换过的链接集合,防止重复替换 const replacedLinks = new Set(); // 只在导航栏区域查找和替换链接 const headerArea = document.querySelector('header') || document.querySelector('nav'); if (!headerArea) { return; } // 在导航区域内查找链接 const navLinks = headerArea.querySelectorAll('a'); navLinks.forEach(link => { // 如果已经替换过,跳过 if (replacedLinks.has(link)) return; const linkText = link.textContent.trim(); const linkHref = link.getAttribute('href') || ''; // 替换Spaces链接 - 仅替换一次 if ( (linkHref.includes('/spaces') || linkHref === '/spaces' || linkText === 'Spaces' || linkText.match(/^s*Spacess*$/i)) && linkText !== 'OCR模型免费转Markdown' && linkText !== 'OCR模型免费转Markdown' ) { link.textContent = 'OCR模型免费转Markdown'; link.href = 'https://fast360.xyz'; link.setAttribute('target', '_blank'); link.setAttribute('rel', 'noopener noreferrer'); replacedLinks.add(link); } // 删除Posts链接 else if ( (linkHref.includes('/posts') || linkHref === '/posts' || linkText === 'Posts' || linkText.match(/^s*Postss*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } // 替换Docs链接 - 仅替换一次 else if ( (linkHref.includes('/docs') || linkHref === '/docs' || linkText === 'Docs' || linkText.match(/^s*Docss*$/i)) && linkText !== '模型下载攻略' ) { link.textContent = '模型下载攻略'; link.href = '/'; replacedLinks.add(link); } // 删除Enterprise链接 else if ( (linkHref.includes('/enterprise') || linkHref === '/enterprise' || linkText === 'Enterprise' || linkText.match(/^s*Enterprises*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } }); // 查找可能嵌套的Spaces和Posts文本 const textNodes = []; function findTextNodes(element) { if (element.nodeType === Node.TEXT_NODE) { const text = element.textContent.trim(); if (text === 'Spaces' || text === 'Posts' || text === 'Enterprise') { textNodes.push(element); } } else { for (const child of element.childNodes) { findTextNodes(child); } } } // 只在导航区域内查找文本节点 findTextNodes(headerArea); // 替换找到的文本节点 textNodes.forEach(node => { const text = node.textContent.trim(); if (text === 'Spaces') { node.textContent = node.textContent.replace(/Spaces/g, 'OCR模型免费转Markdown'); } else if (text === 'Posts') { // 删除Posts文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } else if (text === 'Enterprise') { // 删除Enterprise文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } }); // 标记已替换完成 window._navLinksReplaced = true; } // 替换代码区域中的域名 function replaceCodeDomains() { // 特别处理span.hljs-string和span.njs-string元素 document.querySelectorAll('span.hljs-string, span.njs-string, span[class*="hljs-string"], span[class*="njs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换hljs-string类的span中的域名(移除多余的转义符号) document.querySelectorAll('span.hljs-string, span[class*="hljs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换pre和code标签中包含git clone命令的域名 document.querySelectorAll('pre, code').forEach(element => { if (element.textContent && element.textContent.includes('git clone')) { const text = element.innerHTML; if (text.includes('huggingface.co')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 处理特定的命令行示例 document.querySelectorAll('pre, code').forEach(element => { const text = element.innerHTML; if (text.includes('huggingface.co')) { // 针对git clone命令的专门处理 if (text.includes('git clone') || text.includes('GIT_LFS_SKIP_SMUDGE=1')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 特别处理模型下载页面上的代码片段 document.querySelectorAll('.flex.border-t, .svelte_hydrator, .inline-block').forEach(container => { const content = container.innerHTML; if (content && content.includes('huggingface.co')) { container.innerHTML = content.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 特别处理模型仓库克隆对话框中的代码片段 try { // 查找包含"Clone this model repository"标题的对话框 const cloneDialog = document.querySelector('.svelte_hydration_boundary, [data-target="MainHeader"]'); if (cloneDialog) { // 查找对话框中所有的代码片段和命令示例 const codeElements = cloneDialog.querySelectorAll('pre, code, span'); codeElements.forEach(element => { if (element.textContent && element.textContent.includes('huggingface.co')) { if (element.innerHTML.includes('huggingface.co')) { element.innerHTML = element.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { element.textContent = element.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); } // 更精确地定位克隆命令中的域名 document.querySelectorAll('[data-target]').forEach(container => { const codeBlocks = container.querySelectorAll('pre, code, span.hljs-string'); codeBlocks.forEach(block => { if (block.textContent && block.textContent.includes('huggingface.co')) { if (block.innerHTML.includes('huggingface.co')) { block.innerHTML = block.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { block.textContent = block.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); }); } catch (e) { // 错误处理但不打印日志 } } // 当DOM加载完成后执行替换 if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', () => { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); }); } else { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); } // 增加一个MutationObserver来处理可能的动态元素加载 const observer = new MutationObserver(mutations => { // 检查是否导航区域有变化 const hasNavChanges = mutations.some(mutation => { // 检查是否存在header或nav元素变化 return Array.from(mutation.addedNodes).some(node => { if (node.nodeType === Node.ELEMENT_NODE) { // 检查是否是导航元素或其子元素 if (node.tagName === 'HEADER' || node.tagName === 'NAV' || node.querySelector('header, nav')) { return true; } // 检查是否在导航元素内部 let parent = node.parentElement; while (parent) { if (parent.tagName === 'HEADER' || parent.tagName === 'NAV') { return true; } parent = parent.parentElement; } } return false; }); }); // 只在导航区域有变化时执行替换 if (hasNavChanges) { // 重置替换状态,允许再次替换 window._navLinksReplaced = false; replaceHeaderBranding(); replaceNavigationLinks(); } }); // 开始观察document.body的变化,包括子节点 if (document.body) { observer.observe(document.body, { childList: true, subtree: true }); } else { document.addEventListener('DOMContentLoaded', () => { observer.observe(document.body, { childList: true, subtree: true }); }); } })(); \r\n","cause_traceback":["Traceback (most recent call last):\n"," File \"/src/services/worker/src/worker/job_runners/split/first_rows.py\", line 211, in compute_first_rows_from_streaming_response\n info = get_dataset_config_info(path=dataset, config_name=config, token=hf_token)\n"," File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py\", line 277, in get_dataset_config_info\n builder = load_dataset_builder(\n"," File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py\", line 1853, in load_dataset_builder\n dataset_module = dataset_module_factory(\n"," File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py\", line 1729, in dataset_module_factory\n raise e1 from None\n"," File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py\", line 1686, in dataset_module_factory\n return HubDatasetModuleFactoryWithoutScript(\n"," File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py\", line 1065, in get_module\n data_files = DataFilesDict.from_patterns(\n"," File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/data_files.py\", line 721, in from_patterns\n else DataFilesList.from_patterns(\n"," File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/data_files.py\", line 624, in from_patterns\n resolve_pattern(\n"," File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/data_files.py\", line 388, in resolve_pattern\n for filepath, info in fs.glob(pattern, detail=True, **glob_kwargs).items()\n"," File \"/src/services/worker/.venv/lib/python3.9/site-packages/huggingface_hub/hf_file_system.py\", line 409, in glob\n return super().glob(path, **kwargs)\n"," File \"/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/spec.py\", line 604, in glob\n allpaths = self.find(root, maxdepth=depth, withdirs=True, detail=True, **kwargs)\n"," File \"/src/services/worker/.venv/lib/python3.9/site-packages/huggingface_hub/hf_file_system.py\", line 422, in find\n return super().find(\n"," File \"/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/spec.py\", line 495, in find\n out[path] = self.info(path)\n"," File \"/src/services/worker/.venv/lib/python3.9/site-packages/huggingface_hub/hf_file_system.py\", line 532, in info\n paths_info = self._api.get_paths_info(\n"," File \"/src/services/worker/.venv/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py\", line 114, in _inner_fn\n return fn(*args, **kwargs)\n"," File \"/src/services/worker/.venv/lib/python3.9/site-packages/huggingface_hub/hf_api.py\", line 3237, in get_paths_info\n hf_raise_for_status(response)\n"," File \"/src/services/worker/.venv/lib/python3.9/site-packages/huggingface_hub/utils/_http.py\", line 477, in hf_raise_for_status\n raise _format(HfHubHTTPError, str(e), response) from e\n","huggingface_hub.errors.HfHubHTTPError: 504 Server Error: Gateway Time-out for url: https://huggingface.co/api/datasets/wisenut-nlp-team/instruction_20M/paths-info/84c7873b47cb3e29cded0d6a680e1cfb54aa3880\n\n\r\n504 Gateway Time-out\r\n\r\n

504 Gateway Time-out

\r\n\r\n\n"],"error_code":"InfoError"}},"jwt":"eyJhbGciOiJFZERTQSJ9.eyJyZWFkIjp0cnVlLCJwZXJtaXNzaW9ucyI6eyJyZXBvLmNvbnRlbnQucmVhZCI6dHJ1ZX0sImlhdCI6MTc1NzI2MjcyNywic3ViIjoiL2RhdGFzZXRzL3dpc2VudXQtbmxwLXRlYW0vaW5zdHJ1Y3Rpb25fMjBNIiwiZXhwIjoxNzU3MjY2MzI3LCJpc3MiOiJodHRwczovL2h1Z2dpbmdmYWNlLmNvIn0.9o-i4ZYeAhWHRw-OKR6B4sBJ46338JJXLoan5BhIgND_EAL688lvJfbTWtGixyEuuAZPrU30t_BwEyJ6aDqsAw","displayUrls":true},"dataset":"wisenut-nlp-team/instruction_20M","isGated":false,"isPrivate":false,"hasParquetFormat":true,"author":{"_id":"646c808293badbc8c2e770bd","avatarUrl":"https://aifasthub.com/avatars/v1/production/uploads/646c7ec8e77eaac8f8d2397d/xD2HveJL7hIbGYjO4i9pC.png","fullname":"wisenut-nlp","name":"wisenut-nlp-team","type":"org","isHf":false,"isHfAdmin":false,"isMod":false,"isEnterprise":false,"followerCount":16},"compact":true}">
Dataset Viewer (First 5GB)
Auto-converted to Parquet
The dataset viewer is not available for this split.
The info cannot be fetched for the config 'ko_6_en_4' of the dataset.
Error code:   InfoError
Exception:    HfHubHTTPError
Message:      504 Server Error: Gateway Time-out for url: https://huggingface.co/api/datasets/wisenut-nlp-team/instruction_20M/paths-info/84c7873b47cb3e29cded0d6a680e1cfb54aa3880

<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
</body>
</html>
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/split/first_rows.py", line 211, in compute_first_rows_from_streaming_response
                  info = get_dataset_config_info(path=dataset, config_name=config, token=hf_token)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 277, in get_dataset_config_info
                  builder = load_dataset_builder(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1853, in load_dataset_builder
                  dataset_module = dataset_module_factory(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1729, in dataset_module_factory
                  raise e1 from None
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1686, in dataset_module_factory
                  return HubDatasetModuleFactoryWithoutScript(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1065, in get_module
                  data_files = DataFilesDict.from_patterns(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/data_files.py", line 721, in from_patterns
                  else DataFilesList.from_patterns(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/data_files.py", line 624, in from_patterns
                  resolve_pattern(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/data_files.py", line 388, in resolve_pattern
                  for filepath, info in fs.glob(pattern, detail=True, **glob_kwargs).items()
                File "/src/services/worker/.venv/lib/python3.9/site-packages/huggingface_hub/hf_file_system.py", line 409, in glob
                  return super().glob(path, **kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/spec.py", line 604, in glob
                  allpaths = self.find(root, maxdepth=depth, withdirs=True, detail=True, **kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/huggingface_hub/hf_file_system.py", line 422, in find
                  return super().find(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/spec.py", line 495, in find
                  out[path] = self.info(path)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/huggingface_hub/hf_file_system.py", line 532, in info
                  paths_info = self._api.get_paths_info(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
                  return fn(*args, **kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/huggingface_hub/hf_api.py", line 3237, in get_paths_info
                  hf_raise_for_status(response)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/huggingface_hub/utils/_http.py", line 477, in hf_raise_for_status
                  raise _format(HfHubHTTPError, str(e), response) from e
              huggingface_hub.errors.HfHubHTTPError: 504 Server Error: Gateway Time-out for url: https://huggingface.co/api/datasets/wisenut-nlp-team/instruction_20M/paths-info/84c7873b47cb3e29cded0d6a680e1cfb54aa3880
              
              <html>
              <head><title>504 Gateway Time-out</title></head>
              <body>
              <center><h1>504 Gateway Time-out</h1></center>
              </body>
              </html>

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

README.md exists but content is empty.
Downloads last month
6