auto match template when change model_name

Former-commit-id: ab2d7ab0572765ce33a52ac71641062d5d904db4
This commit is contained in:
codemayq
2023-08-14 20:56:05 +08:00
parent 9585699918
commit 93b281c016
3 changed files with 4 additions and 6 deletions

View File

@@ -49,11 +49,8 @@ def get_model_path(model_name: str) -> str:
def get_template(
template: str,
model_name: str,
) -> str:
if template and template != "default":
return template
if model_name == "Custom":
model_name_or_path = get_model_path(model_name)
# get last dir