1. add model and dataset info to support webui

Former-commit-id: 92f6226f3fecbd9af744a7232dda2c68b2bb0d86
This commit is contained in:
huniu20
2024-10-10 16:46:34 +08:00
parent c42dcab32b
commit aad79127e6
6 changed files with 24 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ from ..extras.constants import (
DownloadSource,
)
from ..extras.logging import get_logger
from ..extras.misc import use_modelscope
from ..extras.misc import use_modelscope, use_openmind
from ..extras.packages import is_gradio_available
@@ -112,6 +112,13 @@ def get_model_path(model_name: str) -> str:
): # replace path
model_path = path_dict.get(DownloadSource.MODELSCOPE)
if (
use_openmind()
and path_dict.get(DownloadSource.MODELERS)
and model_path == path_dict.get(DownloadSource.DEFAULT)
): # replace path
model_path = path_dict.get(DownloadSource.MODELERS)
return model_path