fix: add a button to last page on logs
This commit is contained in:
@@ -151,7 +151,7 @@ export async function queryModelScopeModels(
|
||||
config?: any
|
||||
) {
|
||||
const tagsCriterion = params.tags?.map((tag: string) => {
|
||||
return { category: 'tags', predicate: 'contains', values: [tag] };
|
||||
return { category: 'libraries', predicate: 'contains', values: [tag] };
|
||||
});
|
||||
const tasksCriterion = params.tasks?.map((task: string) => {
|
||||
return { category: 'tasks', predicate: 'contains', values: [task] };
|
||||
|
||||
@@ -303,7 +303,6 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
|
||||
{ backend: backendParamsTips.backend || '' }
|
||||
)}{' '}
|
||||
<Typography.Link
|
||||
style={{ color: 'var(--ant-blue-4)' }}
|
||||
href={backendParamsTips.link}
|
||||
target="_blank"
|
||||
>
|
||||
|
||||
@@ -125,6 +125,10 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
|
||||
return [...shardFileListResult, ...newGeneralFileList];
|
||||
}, []);
|
||||
|
||||
const hfFileFilter = (file: any) => {
|
||||
return filterRegGGUF.test(file.path) || _.includes(file.path, '.gguf');
|
||||
};
|
||||
|
||||
// hugging face files
|
||||
const getHuggingfaceFiles = async () => {
|
||||
try {
|
||||
@@ -139,7 +143,7 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
|
||||
});
|
||||
|
||||
const list = _.filter(fileList, (file: any) => {
|
||||
return filterRegGGUF.test(file.path) || _.includes(file.path, '.gguf');
|
||||
return hfFileFilter(file);
|
||||
});
|
||||
|
||||
return list;
|
||||
@@ -148,6 +152,10 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
|
||||
}
|
||||
};
|
||||
|
||||
const modelscopeFileFilter = (file: any) => {
|
||||
return filterRegGGUF.test(file.Path) && file.Type === 'blob';
|
||||
};
|
||||
|
||||
// modelscope files
|
||||
const getModelScopeFiles = async () => {
|
||||
try {
|
||||
@@ -161,7 +169,7 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
|
||||
}
|
||||
);
|
||||
const fileList = _.filter(_.get(data, ['Data', 'Files']), (file: any) => {
|
||||
return filterRegGGUF.test(file.Path) && file.Type === 'blob';
|
||||
return modelscopeFileFilter(file);
|
||||
});
|
||||
|
||||
const list = _.map(fileList, (item: any) => {
|
||||
|
||||
@@ -51,6 +51,8 @@ const ViewCodeModal: React.FC<ViewModalProps> = (props) => {
|
||||
url: `${MODELS_API}/${props.modelId}/instances`,
|
||||
handler: updateHandler
|
||||
});
|
||||
} else {
|
||||
logsViewerRef.current?.abort();
|
||||
}
|
||||
return () => {
|
||||
requestRef.current?.current?.cancel?.();
|
||||
|
||||
Reference in New Issue
Block a user