style: add model selection tips in playground
This commit is contained in:
@@ -19,7 +19,7 @@ import {
|
||||
queryHuggingfaceModelFiles,
|
||||
queryModelScopeModelFiles
|
||||
} from '../apis';
|
||||
import { modelSourceMap } from '../config';
|
||||
import { backendOptionsMap, modelSourceMap } from '../config';
|
||||
import '../style/hf-model-file.less';
|
||||
import ModelFileItem from './model-file-item';
|
||||
import TitleWrapper from './title-wrapper';
|
||||
@@ -228,6 +228,7 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
|
||||
try {
|
||||
const evaluateFileList = list.map((item: any) => {
|
||||
return {
|
||||
backend: backendOptionsMap.llamaBox,
|
||||
source: modelSource,
|
||||
...(modelSource === modelSourceMap.huggingface_value
|
||||
? {
|
||||
|
||||
@@ -207,8 +207,19 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
|
||||
try {
|
||||
const repoList = list.map((item) => {
|
||||
const res = handleRecognizeAudioModel(item, modelSource);
|
||||
let backendObj = {};
|
||||
if (res.isAudio) {
|
||||
backendObj = {
|
||||
backend: backendOptionsMap.voxBox
|
||||
};
|
||||
} else if (item.isGGUF) {
|
||||
// backendObj = {
|
||||
// backend: backendOptionsMap.llamaBox
|
||||
// };
|
||||
}
|
||||
|
||||
return {
|
||||
...(res.isAudio ? { backend: backendOptionsMap.voxBox } : {}),
|
||||
...backendObj,
|
||||
source: modelSource,
|
||||
...(modelSource === modelSourceMap.huggingface_value
|
||||
? {
|
||||
|
||||
Reference in New Issue
Block a user