chore: update vllm parameters, do not change backend when file type unknown

This commit is contained in:
jialin
2025-04-16 12:34:18 +08:00
parent ced45bec65
commit c831c19848
14 changed files with 298 additions and 211 deletions
+14 -11
View File
@@ -277,18 +277,21 @@ const ModelCard: React.FC<{
return null;
};
const generateModeScopeImgLink = (imgSrc: string) => {
if (!imgSrc) {
const generateModeScopeImgLink = useCallback(
(imgSrc: string) => {
if (!imgSrc) {
return '';
}
if (modelSource === modelSourceMap.modelscope_value) {
return `https://modelscope.cn/api/v1/models/${modelData?.name}/repo?Revision=${modelData?.Revision}&View=true&FilePath=${imgSrc}`;
}
if (modelSource === modelSourceMap.huggingface_value) {
return `https://huggingface.co/${modelData?.id}/resolve/main/${imgSrc}`;
}
return '';
}
if (modelSource === modelSourceMap.modelscope_value) {
return `https://modelscope.cn/api/v1/models/${modelData?.name}/repo?Revision=${modelData?.Revision}&View=true&FilePath=${imgSrc}`;
}
if (modelSource === modelSourceMap.huggingface_value) {
return `https://huggingface.co/${modelData?.id}/resolve/main/${imgSrc}`;
}
return '';
};
},
[modelSource, modelData?.name, modelData?.id, modelData?.Revision]
);
useEffect(() => {
getModelCardData();