fix: add a button to last page on logs
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user