Refactor: run "hatch run style:fmt"
This commit is contained in:
@@ -526,9 +526,10 @@ def create_inference_app(model_holder: TTSModelHolder) -> gr.Blocks:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
from config import get_path_config
|
||||
import torch
|
||||
|
||||
from config import get_path_config
|
||||
|
||||
path_config = get_path_config()
|
||||
assets_root = path_config.assets_root
|
||||
device = "cuda" if torch.cuda.is_available() else "cpu"
|
||||
|
||||
@@ -204,7 +204,11 @@ if __name__ == "__main__":
|
||||
|
||||
if model_name:
|
||||
# load_models() の 処理内容が i の正当性を担保していることに注意
|
||||
model_ids = [i for i, x in enumerate(model_holder.models_info) if x.name == model_name]
|
||||
model_ids = [
|
||||
i
|
||||
for i, x in enumerate(model_holder.models_info)
|
||||
if x.name == model_name
|
||||
]
|
||||
if not model_ids:
|
||||
raise_validation_error(
|
||||
f"model_name={model_name} not found", "model_name"
|
||||
|
||||
Reference in New Issue
Block a user