1. add model and dataset info to support webui
Former-commit-id: 92f6226f3fecbd9af744a7232dda2c68b2bb0d86
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user