diff --git a/src/locales/zh-CN/models.ts b/src/locales/zh-CN/models.ts index 7320c577..cab052d5 100644 --- a/src/locales/zh-CN/models.ts +++ b/src/locales/zh-CN/models.ts @@ -116,7 +116,7 @@ export default { 'models.form.files': '文件', 'models.table.status': '状态', 'models.form.submit.anyway': '仍然提交', - 'models.form.evaluating': '评估模型兼容性', + 'models.form.evaluating': '评估模型兼容性中...', 'models.form.incompatible': '检测到不兼容', 'models.form.restart.onerror': '错误时重启', 'models.form.restart.onerror.tips': '当发生错误时,将自动尝试恢复', diff --git a/src/pages/llmodels/components/deploy-builtin-modal.tsx b/src/pages/llmodels/components/deploy-builtin-modal.tsx index c0e55a6f..fc1e6936 100644 --- a/src/pages/llmodels/components/deploy-builtin-modal.tsx +++ b/src/pages/llmodels/components/deploy-builtin-modal.tsx @@ -496,7 +496,8 @@ const AddModal: React.FC = (props) => { sizeOptions: sizeOptions, quantizationOptions: quantizationOptions, onSizeChange: handleOnSizeChange, - onQuantizationChange: handleOnQuantizationChange + onQuantizationChange: handleOnQuantizationChange, + onValuesChange: handleOnValuesChange }} > diff --git a/src/pages/llmodels/hooks/index.ts b/src/pages/llmodels/hooks/index.ts index 2b224911..fc8fd80b 100644 --- a/src/pages/llmodels/hooks/index.ts +++ b/src/pages/llmodels/hooks/index.ts @@ -244,7 +244,7 @@ export const useCheckCompatibility = () => { show: true, title: '', type: 'transition', - message: intl.formatMessage({ id: 'models.form.check.params' }) + message: intl.formatMessage({ id: 'models.form.evaluating' }) }); const evalution = await evaluationsModelSpec( { diff --git a/src/pages/playground/components/ground-tts.tsx b/src/pages/playground/components/ground-tts.tsx index d7a0f2f5..4e0d2eea 100644 --- a/src/pages/playground/components/ground-tts.tsx +++ b/src/pages/playground/components/ground-tts.tsx @@ -10,7 +10,7 @@ import { Form, Spin } from 'antd'; import classNames from 'classnames'; import _ from 'lodash'; import 'overlayscrollbars/overlayscrollbars.css'; -import { +import React, { forwardRef, useCallback, useEffect, @@ -248,7 +248,6 @@ const GroundTTS: React.FC = forwardRef((props, ref) => { }); const newList = sortVoiceList(locale, list); - setVoiceList(newList); setParams((pre: any) => { return { @@ -269,14 +268,14 @@ const GroundTTS: React.FC = forwardRef((props, ref) => { setParams(allValues); } }, - [] + [handleSelectModel] ); useEffect(() => { if (paramsRef.current) { innitializeParams(paramsRef.current); } - }, [paramsRef.current, innitializeParams]); + }, [innitializeParams]); const handleOnCheckChange = (e: any) => { checkvalueRef.current = e.target.checked; @@ -301,10 +300,10 @@ const GroundTTS: React.FC = forwardRef((props, ref) => { }, [paramsConfig, intl, voiceList]); useEffect(() => { - if (defaultModel) { + if (defaultModel && modelList.length) { handleSelectModel(defaultModel); } - }, [defaultModel]); + }, [defaultModel, modelList.length]); useEffect(() => { if (scroller.current) {