Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e2d35b6fa0 | |||
| 45190980a9 | |||
| 627148a87f | |||
| 74be7688c9 | |||
| 7a2b1da9ff | |||
| dfd7234fd6 | |||
| 22b1a78132 | |||
| d28ad1a292 | |||
| 1b22718d5a |
@@ -18,7 +18,7 @@
|
||||
{
|
||||
"id": "cpus",
|
||||
"name": "CPU处理器",
|
||||
"icon": "ri-memory-line",
|
||||
"icon": "ri-cpu-line",
|
||||
"color": "purple",
|
||||
"description": "Intel、AMD等CPU处理器参数",
|
||||
"order": 3
|
||||
@@ -29,7 +29,8 @@
|
||||
"icon": "ri-smartphone-line",
|
||||
"color": "orange",
|
||||
"description": "各品牌手机参数规格",
|
||||
"order": 4
|
||||
"order": 4,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"id": "laptops",
|
||||
@@ -42,8 +43,8 @@
|
||||
{
|
||||
"id": "021dc76d36be",
|
||||
"name": "汽车",
|
||||
"icon": "ri-folder-line",
|
||||
"color": "blue",
|
||||
"icon": "ri-car-line",
|
||||
"color": "red",
|
||||
"order": 6,
|
||||
"description": "汽车方面",
|
||||
"created_at": "2026-04-09 10:09:01"
|
||||
|
||||
10
data/config.json
Normal file
10
data/config.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"site_name": "ParamHub",
|
||||
"site_subtitle": "参数百科",
|
||||
"footer_text": "ParamHub - 模型与硬件参数速查平台",
|
||||
"icp_number": "",
|
||||
"copyright_year": "2026",
|
||||
"contact_email": "wlq@tphai.com",
|
||||
"github_url": "",
|
||||
"updated_at": "2026-04-11 02:28:39"
|
||||
}
|
||||
@@ -7,5 +7,28 @@
|
||||
"category_id": "021dc76d36be",
|
||||
"id": "3d20dbcd4bdd",
|
||||
"created_at": "2026-04-09 10:09:56"
|
||||
},
|
||||
{
|
||||
"name": "秦PLUS",
|
||||
"brand": "比亚迪",
|
||||
"price": 5.98,
|
||||
"specs": {
|
||||
"长宽高": "4780*1837*1515mm",
|
||||
"轴距": "2718mm",
|
||||
"前轮距": "1580mm",
|
||||
"后轮距": "1590mm",
|
||||
"轮胎规格": "225/60 R16",
|
||||
"发动机": "1.5L 101马力 L4",
|
||||
"最大功率": "74kW",
|
||||
"最大扭矩": "126N·m",
|
||||
"变速器": "E-CVT无级变速器",
|
||||
"中控屏幕尺寸": "10.1英寸"
|
||||
},
|
||||
"description": "秦PLUS是一款外观设计极具现代感和运动气息的车型,采用家族化设计语言,配备大尺寸进气格栅和锐利LED大灯。车身线条流畅,内饰简洁大气,配备10.1英寸中控屏和语音识别系统。搭载1.5L发动机和E-CVT变速器,提供平稳动力输出和低油耗。内部空间宽敞,座椅舒适,支持多种调节功能。",
|
||||
"id": "b78fc7983a70",
|
||||
"category_id": "021dc76d36be",
|
||||
"created_at": "2026-04-11 02:03:45",
|
||||
"visible": true,
|
||||
"raw_text": "秦PLUS的外观设计极具现代感和运动气息,前脸采用了家族化设计语言,标志性的大尺寸进气格栅占据了前脸的大部分空间,搭配锐利的LED大灯组,营造出强烈的视觉冲击力。车身线条流畅,腰线从车头贯穿至车尾,增强了整车的运动感。车尾部分,简洁大方的设计与前脸相呼应,整体风格时尚而不失稳重。\n\n上海:秦PLUS优惠促销,最新报价5.98万!轻松开新车\n\n秦PLUS拥有4780*1837*1515mm的长宽高尺寸和2718mm的轴距,赋予其宽敞的内部空间。车侧线条流畅且动感十足,从前轮距1580mm到后轮距1590mm,车轮布局合理,增强了车辆的稳定性和操控性。配备的225/60 R16轮胎规格,匹配独特风格的轮圈,为车辆增添了一抹动感与时尚的气息。\n\n上海:秦PLUS优惠促销,最新报价5.98万!轻松开新车\n\n秦PLUS的内饰风格简洁大气,给人以科技感和舒适感。中控台布局合理,配备了10.1英寸的中控屏幕,支持语音识别控制系统,可轻松操作多媒体系统、导航、电话和空调等功能。方向盘采用皮质材料,手感舒适,支持手动上下和前后调节,方便驾驶员调整到最佳驾驶姿势。座椅采用仿皮材质,主驾驶座椅具备前后调节、靠背调节和高低调节功能,而副驾驶座椅则支持前后调节和靠背调节,确保了乘客的舒适度。后排座椅可以按比例放倒,增加储物空间,同时,车内还配备了USB和Type-C接口,方便乘客为电子设备充电。\n\n上海:秦PLUS优惠促销,最新报价5.98万!轻松开新车\n\n秦PLUS搭载了一台1.5L 101马力的L4发动机,最大功率为74kW,最大扭矩为126N·m。与之匹配的是E-CVT无级变速器,这使得车辆在提供平稳的动力输出的同时,还能有效降低油耗。\n\n汽车之家车主@天艺风云 表示,外观设计是他当初选择秦PLUS的原因之一。他赞赏整体造型时尚大气,龙脸设计搭配犀利的大灯,辨识度极高。车身线条流畅,溜背式造型增添了几分运动感。全新的“龙鳞辉熠”格栅,精致又霸气,每次停车都有人问这是什么车,外观确实很吸引人。"
|
||||
}
|
||||
]
|
||||
205
data/models.json
205
data/models.json
@@ -1,14 +1,195 @@
|
||||
[
|
||||
{"id": "gpt4", "name": "GPT-4", "organization": "OpenAI", "parameters": 1760, "architecture": "Transformer", "context_length": 8192, "input_price": 0.03, "output_price": 0.06, "mmlu": 86.4, "humaneval": 67.0, "is_open_source": false, "license": "Proprietary", "description": "OpenAI最强大的多模态大模型", "created_at": "2024-01-01"},
|
||||
{"id": "gpt4turbo", "name": "GPT-4 Turbo", "organization": "OpenAI", "parameters": 1760, "architecture": "Transformer", "context_length": 128000, "input_price": 0.01, "output_price": 0.03, "mmlu": 86.4, "humaneval": 67.0, "is_open_source": false, "license": "Proprietary", "description": "GPT-4增强版,128K上下文", "created_at": "2024-01-01"},
|
||||
{"id": "gpt35", "name": "GPT-3.5 Turbo", "organization": "OpenAI", "parameters": 175, "architecture": "Transformer", "context_length": 16385, "input_price": 0.0005, "output_price": 0.0015, "mmlu": 70.0, "humaneval": 48.1, "is_open_source": false, "license": "Proprietary", "description": "性价比高的通用模型", "created_at": "2024-01-01"},
|
||||
{"id": "claude3opus", "name": "Claude 3 Opus", "organization": "Anthropic", "parameters": 400, "architecture": "Transformer", "context_length": 200000, "input_price": 0.015, "output_price": 0.075, "mmlu": 86.8, "humaneval": 84.9, "is_open_source": false, "license": "Proprietary", "description": "Anthropic最强模型,200K上下文", "created_at": "2024-01-01"},
|
||||
{"id": "claude3sonnet", "name": "Claude 3 Sonnet", "organization": "Anthropic", "parameters": 175, "architecture": "Transformer", "context_length": 200000, "input_price": 0.003, "output_price": 0.015, "mmlu": 79.0, "humaneval": 73.0, "is_open_source": false, "license": "Proprietary", "description": "平衡性能与成本", "created_at": "2024-01-01"},
|
||||
{"id": "llama270b", "name": "Llama 2 70B", "organization": "Meta", "parameters": 70, "architecture": "Transformer", "context_length": 4096, "input_price": 0, "output_price": 0, "mmlu": 69.8, "humaneval": 29.9, "is_open_source": true, "license": "Llama 2 Community", "description": "Meta开源大模型,70B参数", "created_at": "2024-01-01"},
|
||||
{"id": "llama3", "name": "Llama 3 70B", "organization": "Meta", "parameters": 70, "architecture": "Transformer", "context_length": 8192, "input_price": 0, "output_price": 0, "mmlu": 82.0, "humaneval": 81.7, "is_open_source": true, "license": "Llama 3 Community", "description": "Meta最新开源模型,性能接近GPT-4", "created_at": "2024-01-01"},
|
||||
{"id": "mistral7b", "name": "Mistral 7B", "organization": "Mistral AI", "parameters": 7, "architecture": "Transformer", "context_length": 32768, "input_price": 0, "output_price": 0, "mmlu": 62.5, "humaneval": 26.8, "is_open_source": true, "license": "Apache 2.0", "description": "小巧高效的开源模型", "created_at": "2024-01-01"},
|
||||
{"id": "mixtral8x7b", "name": "Mixtral 8x7B", "organization": "Mistral AI", "parameters": 47, "architecture": "MoE", "context_length": 32768, "input_price": 0, "output_price": 0, "mmlu": 70.6, "humaneval": 40.2, "is_open_source": true, "license": "Apache 2.0", "description": "MoE架构,高效推理", "created_at": "2024-01-01"},
|
||||
{"id": "qwen72b", "name": "Qwen 72B", "organization": "Alibaba", "parameters": 72, "architecture": "Transformer", "context_length": 32768, "input_price": 0, "output_price": 0, "mmlu": 83.1, "humaneval": 65.4, "is_open_source": true, "license": "Apache 2.0", "description": "阿里开源大模型,中文能力强", "created_at": "2024-01-01"},
|
||||
{"id": "deepseekv3", "name": "DeepSeek V3", "organization": "DeepSeek", "parameters": 685, "architecture": "MoE", "context_length": 128000, "input_price": 0.00014, "output_price": 0.00028, "mmlu": 88.5, "humaneval": 86.2, "is_open_source": true, "license": "MIT", "description": "DeepSeek最新模型,性价比极高", "created_at": "2024-01-01"},
|
||||
{"id": "glm4", "name": "GLM-4", "organization": "Zhipu AI", "parameters": 130, "architecture": "Transformer", "context_length": 128000, "input_price": 0.014, "output_price": 0.014, "mmlu": 81.0, "humaneval": 70.0, "is_open_source": false, "license": "Proprietary", "description": "智谱AI大模型,中文能力强", "created_at": "2024-01-01"}
|
||||
{
|
||||
"id": "gpt4",
|
||||
"name": "GPT-4",
|
||||
"organization": "OpenAI",
|
||||
"parameters": 1760,
|
||||
"architecture": "Transformer",
|
||||
"context_length": 8192,
|
||||
"input_price": 0.03,
|
||||
"output_price": 0.06,
|
||||
"mmlu": 86.4,
|
||||
"humaneval": 67.0,
|
||||
"is_open_source": false,
|
||||
"license": "Proprietary",
|
||||
"description": "OpenAI最强大的多模态大模型",
|
||||
"created_at": "2024-01-01"
|
||||
},
|
||||
{
|
||||
"id": "gpt4turbo",
|
||||
"name": "GPT-4 Turbo",
|
||||
"organization": "OpenAI",
|
||||
"parameters": 1760,
|
||||
"architecture": "Transformer",
|
||||
"context_length": 128000,
|
||||
"input_price": 0.01,
|
||||
"output_price": 0.03,
|
||||
"mmlu": 86.4,
|
||||
"humaneval": 67.0,
|
||||
"is_open_source": false,
|
||||
"license": "Proprietary",
|
||||
"description": "GPT-4增强版,128K上下文",
|
||||
"created_at": "2024-01-01"
|
||||
},
|
||||
{
|
||||
"id": "gpt35",
|
||||
"name": "GPT-3.5 Turbo",
|
||||
"organization": "OpenAI",
|
||||
"parameters": 175,
|
||||
"architecture": "Transformer",
|
||||
"context_length": 16385,
|
||||
"input_price": 0.0005,
|
||||
"output_price": 0.0015,
|
||||
"mmlu": 70.0,
|
||||
"humaneval": 48.1,
|
||||
"is_open_source": false,
|
||||
"license": "Proprietary",
|
||||
"description": "性价比高的通用模型",
|
||||
"created_at": "2024-01-01"
|
||||
},
|
||||
{
|
||||
"id": "claude3opus",
|
||||
"name": "Claude 3 Opus",
|
||||
"organization": "Anthropic",
|
||||
"parameters": 400,
|
||||
"architecture": "Transformer",
|
||||
"context_length": 200000,
|
||||
"input_price": 0.015,
|
||||
"output_price": 0.075,
|
||||
"mmlu": 86.8,
|
||||
"humaneval": 84.9,
|
||||
"is_open_source": false,
|
||||
"license": "Proprietary",
|
||||
"description": "Anthropic最强模型,200K上下文",
|
||||
"created_at": "2024-01-01"
|
||||
},
|
||||
{
|
||||
"id": "claude3sonnet",
|
||||
"name": "Claude 3 Sonnet",
|
||||
"organization": "Anthropic",
|
||||
"parameters": 175,
|
||||
"architecture": "Transformer",
|
||||
"context_length": 200000,
|
||||
"input_price": 0.003,
|
||||
"output_price": 0.015,
|
||||
"mmlu": 79.0,
|
||||
"humaneval": 73.0,
|
||||
"is_open_source": false,
|
||||
"license": "Proprietary",
|
||||
"description": "平衡性能与成本",
|
||||
"created_at": "2024-01-01"
|
||||
},
|
||||
{
|
||||
"id": "llama270b",
|
||||
"name": "Llama 2 70B",
|
||||
"organization": "Meta",
|
||||
"parameters": 70,
|
||||
"architecture": "Transformer",
|
||||
"context_length": 4096,
|
||||
"input_price": 0,
|
||||
"output_price": 0,
|
||||
"mmlu": 69.8,
|
||||
"humaneval": 29.9,
|
||||
"is_open_source": true,
|
||||
"license": "Llama 2 Community",
|
||||
"description": "Meta开源大模型,70B参数",
|
||||
"created_at": "2024-01-01"
|
||||
},
|
||||
{
|
||||
"id": "llama3",
|
||||
"name": "Llama 3 70B",
|
||||
"organization": "Meta",
|
||||
"parameters": 70,
|
||||
"architecture": "Transformer",
|
||||
"context_length": 8192,
|
||||
"input_price": 0,
|
||||
"output_price": 0,
|
||||
"mmlu": 82.0,
|
||||
"humaneval": 81.7,
|
||||
"is_open_source": true,
|
||||
"license": "Llama 3 Community",
|
||||
"description": "Meta最新开源模型,性能接近GPT-4",
|
||||
"created_at": "2024-01-01"
|
||||
},
|
||||
{
|
||||
"id": "mistral7b",
|
||||
"name": "Mistral 7B",
|
||||
"organization": "Mistral AI",
|
||||
"parameters": 7,
|
||||
"architecture": "Transformer",
|
||||
"context_length": 32768,
|
||||
"input_price": 0,
|
||||
"output_price": 0,
|
||||
"mmlu": 62.5,
|
||||
"humaneval": 26.8,
|
||||
"is_open_source": true,
|
||||
"license": "Apache 2.0",
|
||||
"description": "小巧高效的开源模型",
|
||||
"created_at": "2024-01-01"
|
||||
},
|
||||
{
|
||||
"id": "mixtral8x7b",
|
||||
"name": "Mixtral 8x7B",
|
||||
"organization": "Mistral AI",
|
||||
"parameters": 47,
|
||||
"architecture": "MoE",
|
||||
"context_length": 32768,
|
||||
"input_price": 0,
|
||||
"output_price": 0,
|
||||
"mmlu": 70.6,
|
||||
"humaneval": 40.2,
|
||||
"is_open_source": true,
|
||||
"license": "Apache 2.0",
|
||||
"description": "MoE架构,高效推理",
|
||||
"created_at": "2024-01-01"
|
||||
},
|
||||
{
|
||||
"id": "qwen72b",
|
||||
"name": "Qwen 72B",
|
||||
"organization": "Alibaba",
|
||||
"parameters": 72,
|
||||
"architecture": "Transformer",
|
||||
"context_length": 32768,
|
||||
"input_price": 0,
|
||||
"output_price": 0,
|
||||
"mmlu": 83.1,
|
||||
"humaneval": 65.4,
|
||||
"is_open_source": true,
|
||||
"license": "Apache 2.0",
|
||||
"description": "阿里开源大模型,中文能力强",
|
||||
"created_at": "2024-01-01"
|
||||
},
|
||||
{
|
||||
"id": "deepseekv3",
|
||||
"name": "DeepSeek V3",
|
||||
"organization": "DeepSeek",
|
||||
"parameters": 685,
|
||||
"architecture": "MoE",
|
||||
"context_length": 128000,
|
||||
"input_price": 0.00014,
|
||||
"output_price": 0.00028,
|
||||
"mmlu": 88.5,
|
||||
"humaneval": 86.2,
|
||||
"is_open_source": true,
|
||||
"license": "MIT",
|
||||
"description": "DeepSeek最新模型,性价比极高",
|
||||
"created_at": "2024-01-01"
|
||||
},
|
||||
{
|
||||
"id": "glm4",
|
||||
"name": "GLM-4",
|
||||
"organization": "Zhipu AI",
|
||||
"parameters": 130,
|
||||
"architecture": "Transformer",
|
||||
"context_length": 128000,
|
||||
"input_price": 0.014,
|
||||
"output_price": 0.014,
|
||||
"mmlu": 81.0,
|
||||
"humaneval": 70.0,
|
||||
"is_open_source": false,
|
||||
"license": "Proprietary",
|
||||
"description": "智谱AI大模型,中文能力强",
|
||||
"created_at": "2024-01-01",
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
14
static/favicon.svg
Normal file
14
static/favicon.svg
Normal file
@@ -0,0 +1,14 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<!-- 背景 -->
|
||||
<rect x="2" y="2" width="28" height="28" rx="6" fill="#4f46e5"/>
|
||||
<!-- 数据网格 -->
|
||||
<rect x="6" y="6" width="8" height="8" rx="2" fill="white"/>
|
||||
<rect x="18" y="6" width="8" height="8" rx="2" fill="white"/>
|
||||
<rect x="6" y="18" width="8" height="8" rx="2" fill="white"/>
|
||||
<rect x="18" y="18" width="8" height="8" rx="2" fill="white"/>
|
||||
<!-- 连接线 -->
|
||||
<line x1="14" y1="10" x2="18" y2="10" stroke="#4f46e5" stroke-width="2"/>
|
||||
<line x1="10" y1="14" x2="10" y2="18" stroke="#4f46e5" stroke-width="2"/>
|
||||
<line x1="22" y1="14" x2="22" y2="18" stroke="#4f46e5" stroke-width="2"/>
|
||||
<line x1="14" y1="22" x2="18" y2="22" stroke="#4f46e5" stroke-width="2"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 757 B |
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,8 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ category.name }} - ParamHub</title>
|
||||
<title>ParamHub - 参数百科</title>
|
||||
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/remixicon@3.5.0/fonts/remixicon.css" rel="stylesheet">
|
||||
</head>
|
||||
@@ -50,9 +51,16 @@
|
||||
class="w-full pl-12 pr-4 py-2 border border-gray-200 rounded-lg focus:outline-none focus:border-indigo-400"
|
||||
onkeyup="filterItems()">
|
||||
</div>
|
||||
<select id="sortSelect" onchange="sortItems()" class="px-4 py-2 border border-gray-200 rounded-lg focus:outline-none">
|
||||
<select id="sortBy" onchange="loadItems()" class="px-4 py-2 border border-gray-200 rounded-lg focus:outline-none">
|
||||
<option value="default">默认排序(置顶优先)</option>
|
||||
<option value="publish_date">按发布日期</option>
|
||||
<option value="views">按热度</option>
|
||||
<option value="name">按名称</option>
|
||||
<option value="created_at">按时间</option>
|
||||
<option value="created_at">按创建时间</option>
|
||||
</select>
|
||||
<select id="sortOrder" onchange="loadItems()" class="px-4 py-2 border border-gray-200 rounded-lg focus:outline-none">
|
||||
<option value="desc">降序</option>
|
||||
<option value="asc">升序</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -115,7 +123,9 @@
|
||||
|
||||
// 加载数据
|
||||
async function loadItems() {
|
||||
const res = await fetch(`/api/items/${categoryId}`);
|
||||
const sortBy = document.getElementById('sortBy').value;
|
||||
const sortOrder = document.getElementById('sortOrder').value;
|
||||
const res = await fetch(`/api/items/${categoryId}?sort=${sortBy}&order=${sortOrder}`);
|
||||
allItems = await res.json();
|
||||
|
||||
document.getElementById('itemCount').textContent = allItems.length;
|
||||
@@ -136,22 +146,28 @@
|
||||
|
||||
document.getElementById('itemsList').innerHTML = items.map(item => {
|
||||
const fields = Object.entries(item)
|
||||
.filter(([key, val]) => !['id', 'category_id', 'created_at', 'updated_at'].includes(key) && val)
|
||||
.filter(([key, val]) => !['id', 'category_id', 'created_at', 'updated_at', 'visible', 'is_pinned', 'views', 'publish_date'].includes(key) && val)
|
||||
.slice(0, 5)
|
||||
.map(([key, val]) => `<span class="text-gray-500 text-sm">${key}: ${val}</span>`)
|
||||
.join('<br>');
|
||||
|
||||
return `
|
||||
<div class="border border-gray-200 rounded-lg p-4 hover:shadow-md transition group">
|
||||
<div class="border border-gray-200 rounded-lg p-4 hover:shadow-md transition group ${item.is_pinned ? 'bg-yellow-50 border-yellow-300' : ''}">
|
||||
<div class="flex items-start justify-between">
|
||||
<div>
|
||||
<h3 class="font-medium text-gray-800 group-hover:text-indigo-600">${item.name || item.title || '未命名'}</h3>
|
||||
<h3 class="font-medium text-gray-800 group-hover:text-indigo-600 flex items-center gap-2">
|
||||
${item.is_pinned ? '<i class="ri-pushpin-fill text-yellow-500" title="置顶"></i>' : ''}
|
||||
${item.name || item.title || '未命名'}
|
||||
</h3>
|
||||
<div class="mt-2 space-y-1">
|
||||
${fields}
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-xs text-gray-400">
|
||||
${item.created_at ? item.created_at.split(' ')[0] : ''}
|
||||
<div class="text-right">
|
||||
<div class="text-xs text-gray-400">
|
||||
${item.publish_date || (item.created_at ? item.created_at.split(' ')[0] : '')}
|
||||
</div>
|
||||
${item.views ? `<div class="text-xs text-gray-400 mt-1"><i class="ri-eye-line"></i> ${item.views}</div>` : ''}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -175,19 +191,6 @@
|
||||
renderItems(filtered);
|
||||
}
|
||||
|
||||
// 排序
|
||||
function sortItems() {
|
||||
const sortBy = document.getElementById('sortSelect').value;
|
||||
const sorted = [...allItems].sort((a, b) => {
|
||||
if (sortBy === 'name') {
|
||||
return (a.name || a.title || '').localeCompare(b.name || b.title || '');
|
||||
} else {
|
||||
return (b.created_at || '').localeCompare(a.created_at || '');
|
||||
}
|
||||
});
|
||||
renderItems(sorted);
|
||||
}
|
||||
|
||||
// 初始化
|
||||
loadNav();
|
||||
loadItems();
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>对比工具 - ParamHub</title>
|
||||
<title>ParamHub - 参数百科</title>
|
||||
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/remixicon@3.5.0/fonts/remixicon.css" rel="stylesheet">
|
||||
</head>
|
||||
@@ -40,7 +41,7 @@
|
||||
<i class="ri-cpu-line mr-2"></i>GPU对比
|
||||
</button>
|
||||
<button onclick="setCompareType('cpu')" id="btnCpu" class="px-4 py-2 bg-gray-200 text-gray-600 rounded-lg hover:bg-gray-300">
|
||||
<i class="ri-memory-line mr-2"></i>CPU对比
|
||||
<i class="ri-cpu-line mr-2"></i>CPU对比
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -230,6 +231,7 @@ let compareType = 'model';
|
||||
}
|
||||
|
||||
// 初始化
|
||||
loadNav();
|
||||
setCompareType('model');
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>CPU数据库 - ParamHub</title>
|
||||
<title>ParamHub - 参数百科</title>
|
||||
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/remixicon@3.5.0/fonts/remixicon.css" rel="stylesheet">
|
||||
</head>
|
||||
@@ -24,7 +25,7 @@
|
||||
<main class="max-w-7xl mx-auto px-4 py-8">
|
||||
<div class="mb-6">
|
||||
<h1 class="text-2xl font-bold text-gray-800 flex items-center gap-2">
|
||||
<i class="ri-memory-line text-purple-600"></i>
|
||||
<i class="ri-cpu-line text-purple-600"></i>
|
||||
CPU数据库
|
||||
</h1>
|
||||
<p class="text-gray-500 mt-1">处理器规格参数一览</p>
|
||||
@@ -208,6 +209,8 @@ async function loadCpus() {
|
||||
if (e.target === this) closeModal();
|
||||
});
|
||||
|
||||
// 初始化
|
||||
loadNav();
|
||||
loadCpus();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>GPU数据库 - ParamHub</title>
|
||||
<title>ParamHub - 参数百科</title>
|
||||
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/remixicon@3.5.0/fonts/remixicon.css" rel="stylesheet">
|
||||
</head>
|
||||
@@ -215,6 +216,8 @@ async function loadGpus() {
|
||||
if (e.target === this) closeModal();
|
||||
});
|
||||
|
||||
// 初始化
|
||||
loadNav();
|
||||
loadGpus();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>ParamHub - 参数百科</title>
|
||||
<title id="pageTitle">ParamHub - 参数百科</title>
|
||||
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/remixicon@3.5.0/fonts/remixicon.css" rel="stylesheet">
|
||||
</head>
|
||||
@@ -13,8 +14,8 @@
|
||||
<div class="max-w-7xl mx-auto px-4 py-3 flex justify-between items-center">
|
||||
<div class="flex items-center gap-2">
|
||||
<i class="ri-dashboard-3-line text-2xl text-indigo-600"></i>
|
||||
<span class="text-xl font-bold text-gray-800">ParamHub</span>
|
||||
<span class="text-sm text-gray-500">参数百科</span>
|
||||
<span class="text-xl font-bold text-gray-800" id="navSiteName">ParamHub</span>
|
||||
<span class="text-sm text-gray-500" id="navSiteSubtitle">参数百科</span>
|
||||
</div>
|
||||
<div class="flex gap-4 text-sm" id="navLinks">
|
||||
<!-- 动态加载 -->
|
||||
@@ -58,7 +59,7 @@
|
||||
<!-- 热门模型 -->
|
||||
<div class="bg-white rounded-xl shadow-sm p-6">
|
||||
<h2 class="text-lg font-semibold text-gray-800 mb-4 flex items-center gap-2">
|
||||
<i class="ri-flashlight-line text-indigo-600"></i>
|
||||
<i class="ri-cpu-line text-indigo-600"></i>
|
||||
热门模型
|
||||
</h2>
|
||||
<div id="latestModels" class="grid grid-cols-2 gap-4">
|
||||
@@ -69,7 +70,7 @@
|
||||
|
||||
<!-- 页脚 -->
|
||||
<footer class="bg-white border-t mt-8 py-6 text-center text-gray-500 text-sm">
|
||||
ParamHub - 参数百科 | AI模型与硬件参数速查平台
|
||||
<span id="footerText">ParamHub - 参数百科 | AI模型与硬件参数速查平台</span>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
@@ -120,13 +121,32 @@
|
||||
|
||||
// 加载分类和数据统计
|
||||
async function loadData() {
|
||||
// 并行加载分类和统计
|
||||
const [catRes, statsRes] = await Promise.all([
|
||||
// 并行加载分类、统计、配置
|
||||
const [catRes, statsRes, configRes] = await Promise.all([
|
||||
fetch('/api/categories'),
|
||||
fetch('/api/stats')
|
||||
fetch('/api/stats'),
|
||||
fetch('/api/config')
|
||||
]);
|
||||
categories = await catRes.json();
|
||||
const stats = await statsRes.json();
|
||||
const config = await configRes.json();
|
||||
|
||||
// 更新网站名称等
|
||||
if (config.site_name) {
|
||||
document.getElementById('navSiteName').textContent = config.site_name;
|
||||
}
|
||||
if (config.site_subtitle) {
|
||||
document.getElementById('navSiteSubtitle').textContent = config.site_subtitle;
|
||||
}
|
||||
if (config.site_name && config.site_subtitle) {
|
||||
document.getElementById('pageTitle').textContent = `${config.site_name} - ${config.site_subtitle}`;
|
||||
}
|
||||
if (config.footer_text) {
|
||||
document.getElementById('footerText').textContent = config.footer_text;
|
||||
}
|
||||
if (config.icp_number) {
|
||||
document.getElementById('footerText').innerHTML += ` | <a href="https://beian.miit.gov.cn/" target="_blank" class="hover:text-gray-700">${config.icp_number}</a>`;
|
||||
}
|
||||
|
||||
// 渲染导航栏
|
||||
renderNavBar();
|
||||
@@ -146,7 +166,7 @@
|
||||
const statItems = [
|
||||
{key: 'models_count', label: 'AI模型', icon: 'ri-robot-line', color: 'blue'},
|
||||
{key: 'gpus_count', label: 'GPU显卡', icon: 'ri-cpu-line', color: 'green'},
|
||||
{key: 'cpus_count', label: 'CPU处理器', icon: 'ri-memory-line', color: 'purple'},
|
||||
{key: 'cpus_count', label: 'CPU处理器', icon: 'ri-cpu-line', color: 'purple'},
|
||||
{key: 'knowledge_count', label: '知识条目', icon: 'ri-book-open-line', color: 'teal'}
|
||||
];
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>知识库 - ParamHub</title>
|
||||
<title>ParamHub - 参数百科</title>
|
||||
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/remixicon@3.5.0/fonts/remixicon.css" rel="stylesheet">
|
||||
</head>
|
||||
@@ -75,7 +76,7 @@
|
||||
<!-- 显存计算 -->
|
||||
<div class="bg-white rounded-xl shadow-sm p-6">
|
||||
<h2 class="text-lg font-semibold text-gray-800 mb-4 flex items-center gap-2">
|
||||
<i class="ri-memory-line text-orange-600"></i>
|
||||
<i class="ri-cpu-line text-orange-600"></i>
|
||||
如何计算显存需求?
|
||||
</h2>
|
||||
<p class="text-gray-600 leading-relaxed">
|
||||
@@ -177,5 +178,43 @@
|
||||
</table>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<script>
|
||||
let categories = [];
|
||||
|
||||
// 加载导航栏
|
||||
async function loadNav() {
|
||||
const res = await fetch('/api/categories');
|
||||
categories = await res.json();
|
||||
|
||||
const builtinPages = [
|
||||
{name: '首页', href: '/'},
|
||||
{name: '工具', href: '/tools'},
|
||||
{name: '对比', href: '/compare'},
|
||||
{name: '知识库', href: '/knowledge'}
|
||||
];
|
||||
|
||||
const categoryPages = {
|
||||
'ai-models': '/models',
|
||||
'gpus': '/gpus',
|
||||
'cpus': '/cpus'
|
||||
};
|
||||
|
||||
let navHtml = '';
|
||||
builtinPages.forEach(p => {
|
||||
const isActive = window.location.pathname === p.href;
|
||||
navHtml += `<a href="${p.href}" class="${isActive ? 'text-indigo-600 font-medium' : 'text-gray-600 hover:text-indigo-600'}">${p.name}</a>`;
|
||||
});
|
||||
|
||||
categories.forEach(cat => {
|
||||
const href = categoryPages[cat.id] || `/category/${cat.id}`;
|
||||
navHtml += `<a href="${href}" class="text-gray-600 hover:text-indigo-600">${cat.name}</a>`;
|
||||
});
|
||||
|
||||
document.getElementById('topNav').innerHTML = navHtml;
|
||||
}
|
||||
|
||||
loadNav();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,7 +3,8 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>模型数据库 - ParamHub</title>
|
||||
<title>ParamHub - 参数百科</title>
|
||||
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/remixicon@3.5.0/fonts/remixicon.css" rel="stylesheet">
|
||||
</head>
|
||||
@@ -41,14 +42,18 @@
|
||||
oninput="loadModels()">
|
||||
</div>
|
||||
<select id="sortBy" class="px-4 py-2 border border-gray-200 rounded-lg" onchange="loadModels()">
|
||||
<option value="default">默认排序(置顶优先)</option>
|
||||
<option value="publish_date">按发布日期</option>
|
||||
<option value="views">按热度</option>
|
||||
<option value="name">按名称</option>
|
||||
<option value="parameters">按参数量</option>
|
||||
<option value="mmlu">按MMLU分数</option>
|
||||
<option value="context_length">按上下文长度</option>
|
||||
<option value="created_at">按创建时间</option>
|
||||
</select>
|
||||
<select id="sortOrder" class="px-4 py-2 border border-gray-200 rounded-lg" onchange="loadModels()">
|
||||
<option value="asc">升序</option>
|
||||
<option value="desc">降序</option>
|
||||
<option value="asc">升序</option>
|
||||
</select>
|
||||
<select id="filterType" class="px-4 py-2 border border-gray-200 rounded-lg" onchange="loadModels()">
|
||||
<option value="all">全部</option>
|
||||
@@ -162,10 +167,15 @@
|
||||
}
|
||||
|
||||
const html = models.map(m => `
|
||||
<tr class="border-b hover:bg-gray-50 transition">
|
||||
<tr class="border-b hover:bg-gray-50 transition ${m.is_pinned ? 'bg-yellow-50' : ''}">
|
||||
<td class="px-4 py-3">
|
||||
<div class="font-medium text-gray-800">${m.name}</div>
|
||||
<div class="text-xs text-gray-500">${m.architecture || ''}</div>
|
||||
<div class="flex items-center gap-2">
|
||||
${m.is_pinned ? '<i class="ri-pushpin-fill text-yellow-500" title="置顶"></i>' : ''}
|
||||
<div>
|
||||
<div class="font-medium text-gray-800">${m.name}</div>
|
||||
<div class="text-xs text-gray-500">${m.architecture || ''}</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-gray-600">${m.organization}</td>
|
||||
<td class="px-4 py-3">
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>实用工具 - ParamHub</title>
|
||||
<title>ParamHub - 参数百科</title>
|
||||
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/remixicon@3.5.0/fonts/remixicon.css" rel="stylesheet">
|
||||
</head>
|
||||
@@ -33,7 +34,7 @@
|
||||
<!-- 显存计算器 -->
|
||||
<div class="bg-white rounded-xl shadow-sm p-6 mb-6">
|
||||
<h2 class="text-lg font-semibold text-gray-800 mb-4 flex items-center gap-2">
|
||||
<i class="ri-memory-line text-green-600"></i>
|
||||
<i class="ri-cpu-line text-green-600"></i>
|
||||
显存计算器
|
||||
</h2>
|
||||
<p class="text-gray-500 mb-4">计算大模型所需的显存大小,并推荐合适的GPU</p>
|
||||
@@ -197,6 +198,9 @@ async function calculateVram() {
|
||||
|
||||
document.getElementById('vramResult').classList.remove('hidden');
|
||||
}
|
||||
|
||||
// 初始化
|
||||
loadNav();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user