This commit is contained in:
josc146 2023-12-25 16:56:46 +08:00
parent fde988dd4e
commit 8e05f3c360
5 changed files with 16 additions and 9 deletions

View File

@ -25,8 +25,8 @@ document.querySelectorAll('.grid.h-10.grid-cols-12.place-content-center.gap-x-3.
data.size = parseInt(extractValue(rawText, 'size')) data.size = parseInt(extractValue(rawText, 'size'))
data.SHA256 = extractValue(rawText, 'oid sha256:') data.SHA256 = extractValue(rawText, 'oid sha256:')
data.lastUpdated = e.children[3].children[0].getAttribute('datetime') data.lastUpdated = e.children[3].children[0].getAttribute('datetime')
data.url = e.children[1].href.replace('/resolve/', '/blob/') data.url = e.children[1].href.replace('/resolve/', '/blob/').replace('?download=true', '')
data.downloadUrl = e.children[1].href data.downloadUrl = e.children[1].href.replace('?download=true', '')
data.tags = [] data.tags = []
modelsJson.push(data) modelsJson.push(data)

View File

@ -312,6 +312,8 @@
"JP": "日本語", "JP": "日本語",
"Music": "音楽", "Music": "音楽",
"Other": "その他", "Other": "その他",
"Role Play": "ロールプレイ",
"Recommended": "おすすめ",
"Import MIDI": "MIDIをインポート", "Import MIDI": "MIDIをインポート",
"Current Instrument": "現在の楽器", "Current Instrument": "現在の楽器",
"Please convert model to GGML format first": "モデルをGGML形式に変換してください", "Please convert model to GGML format first": "モデルをGGML形式に変換してください",

View File

@ -312,6 +312,8 @@
"JP": "日文", "JP": "日文",
"Music": "音乐", "Music": "音乐",
"Other": "其他", "Other": "其他",
"Role Play": "角色扮演",
"Recommended": "推荐",
"Import MIDI": "导入MIDI", "Import MIDI": "导入MIDI",
"Current Instrument": "当前乐器", "Current Instrument": "当前乐器",
"Please convert model to GGML format first": "请先将模型转换为GGML格式", "Please convert model to GGML format first": "请先将模型转换为GGML格式",

View File

@ -160,7 +160,8 @@ const Models: FC = observer(() => {
useEffect(() => { useEffect(() => {
setTags(Array.from(new Set( setTags(Array.from(new Set(
[...commonStore.modelSourceList.map(item => item.tags || []).flat() ['Recommended',
...commonStore.modelSourceList.map(item => item.tags || []).flat()
.filter(i => !i.includes('Other') && !i.includes('Local')) .filter(i => !i.includes('Other') && !i.includes('Local'))
, 'Other', 'Local']))); , 'Other', 'Local'])));
}, [commonStore.modelSourceList]); }, [commonStore.modelSourceList]);

View File

@ -1,15 +1,17 @@
export type ModelSourceItem = { export type ModelSourceItem = {
name: string; name: string;
size: number;
lastUpdated: string;
desc?: { [lang: string]: string | undefined; }; desc?: { [lang: string]: string | undefined; };
size: number;
SHA256?: string; SHA256?: string;
lastUpdated: string;
url?: string; url?: string;
downloadUrl?: string; downloadUrl?: string;
tags?: string[];
customTokenizer?: string;
hide?: boolean;
lastUpdatedMs?: number;
isComplete?: boolean; isComplete?: boolean;
isLocal?: boolean; isLocal?: boolean;
localSize?: number; localSize?: number;
lastUpdatedMs?: number;
tags?: string[];
hide?: boolean;
}; };