feat: catalog page

This commit is contained in:
jialin
2025-01-03 20:51:22 +08:00
parent 95058f7890
commit 39fff0e57d
11 changed files with 699 additions and 52 deletions
+2 -14
View File
@@ -6,7 +6,7 @@ import { Button, Drawer } from 'antd';
import { debounce } from 'lodash';
import { memo, useCallback, useEffect, useRef, useState } from 'react';
import { backendOptionsMap, modelSourceMap } from '../config';
import { FormData, ListItem } from '../config/types';
import { FormData } from '../config/types';
import ColumnWrapper from './column-wrapper';
import DataForm from './data-form';
import HFModelFile from './hf-model-file';
@@ -19,7 +19,6 @@ type AddModalProps = {
title: string;
action: PageActionType;
open: boolean;
data?: ListItem;
source: string;
width?: string | number;
onOk: (values: FormData) => void;
@@ -57,10 +56,7 @@ const AddModal: React.FC<AddModalProps> = (props) => {
modelSourceMap.huggingface_value,
modelSourceMap.modelscope_value
];
// const { start } = useDriver({
// steps,
// id: 'deploy-model'
// });
const form = useRef<any>({});
const intl = useIntl();
const [selectedModel, setSelectedModel] = useState<any>({});
@@ -126,14 +122,6 @@ const AddModal: React.FC<AddModalProps> = (props) => {
};
}, [open, source]);
// useEffect(() => {
// if (open && loadfinish) {
// setTimeout(() => {
// start();
// }, 1000);
// }
// }, [loadfinish, open]);
return (
<Drawer
title={