chore: add iluvatar corex in add worker
This commit is contained in:
@@ -6,8 +6,6 @@ import { Empty, Select, Spin } from 'antd';
|
||||
import _ from 'lodash';
|
||||
import React, {
|
||||
forwardRef,
|
||||
memo,
|
||||
useCallback,
|
||||
useEffect,
|
||||
useImperativeHandle,
|
||||
useRef,
|
||||
@@ -119,7 +117,7 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
|
||||
}
|
||||
};
|
||||
|
||||
const generateGroupByFilename = useCallback((list: any[]) => {
|
||||
const generateGroupByFilename = (list: any[]) => {
|
||||
// general file
|
||||
const generalFileList = _.filter(list, (item: any) => {
|
||||
const parsed = parseFilename(item.path);
|
||||
@@ -163,7 +161,7 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
|
||||
);
|
||||
|
||||
return [...shardFileListResult, ...newGeneralFileList];
|
||||
}, []);
|
||||
};
|
||||
|
||||
const hfFileFilter = (file: any) => {
|
||||
return filterRegGGUF.test(file.path) || _.includes(file.path, '.gguf');
|
||||
@@ -228,7 +226,7 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
|
||||
}
|
||||
};
|
||||
|
||||
const getEvaluateResults = useCallback(async (repoList: any[]) => {
|
||||
const getEvaluateResults = async (repoList: any[]) => {
|
||||
try {
|
||||
checkTokenRef.current?.cancel?.();
|
||||
checkTokenRef.current = createAxiosToken();
|
||||
@@ -244,7 +242,7 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
|
||||
} catch (error) {
|
||||
return [];
|
||||
}
|
||||
}, []);
|
||||
};
|
||||
|
||||
const handleEvaluate = async (list: any[]) => {
|
||||
if (isDownload) {
|
||||
@@ -430,4 +428,4 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
|
||||
);
|
||||
});
|
||||
|
||||
export default memo(HFModelFile);
|
||||
export default HFModelFile;
|
||||
|
||||
@@ -5,7 +5,7 @@ import ThemeTag from '@/components/tags-wrapper/theme-tag';
|
||||
import useRequestToken from '@/hooks/use-request-token';
|
||||
import {
|
||||
DownOutlined,
|
||||
FileTextOutlined,
|
||||
FileMarkdownOutlined,
|
||||
RightOutlined
|
||||
} from '@ant-design/icons';
|
||||
import { useIntl } from '@umijs/max';
|
||||
@@ -49,7 +49,7 @@ const MarkDownTitle: React.FC<{
|
||||
return (
|
||||
<MkdTitle onClick={onCollapse}>
|
||||
<span>
|
||||
<FileTextOutlined className="m-r-2 text-tertiary" /> README.md
|
||||
<FileMarkdownOutlined className="m-r-2 text-tertiary" /> README.md
|
||||
</span>
|
||||
<span>
|
||||
{collapsed ? (
|
||||
|
||||
Reference in New Issue
Block a user