Update hatch setting and fmt

This commit is contained in:
litagin02
2024-03-15 21:36:53 +09:00
parent 2ee4f4ac86
commit 14c6805337
4 changed files with 10 additions and 5 deletions

View File

@@ -14,6 +14,7 @@ from style_bert_vits2.nlp.japanese import pyopenjtalk_worker
from style_bert_vits2.nlp.japanese.user_dict import update_dict from style_bert_vits2.nlp.japanese.user_dict import update_dict
from style_bert_vits2.utils.stdout_wrapper import SAFE_STDOUT from style_bert_vits2.utils.stdout_wrapper import SAFE_STDOUT
# このプロセスからはワーカーを起動して辞書を使いたいので、ここで初期化 # このプロセスからはワーカーを起動して辞書を使いたいので、ここで初期化
pyopenjtalk_worker.initialize_worker() pyopenjtalk_worker.initialize_worker()

View File

@@ -39,7 +39,7 @@ dependencies = [
'pyworld-prebuilt', 'pyworld-prebuilt',
'safetensors', 'safetensors',
'scipy', 'scipy',
'torch>=2.1,<2.2', 'torch>=2.1',
'transformers', 'transformers',
] ]
@@ -102,11 +102,11 @@ dependencies = [
[tool.hatch.envs.style.scripts] [tool.hatch.envs.style.scripts]
check = [ check = [
"black --check --diff .", "black --check --diff .",
"isort --check-only --diff --profile black --gitignore --lai 2 .", "isort --check-only --diff --profile black --gitignore --lai 2 . --sg \"Data/*\" --sg \"inputs/*\" --sg \"model_assets/*\" --sg \"static/*\"",
] ]
fmt = [ fmt = [
"black .", "black .",
"isort --profile black --gitignore --lai 2 .", "isort --profile black --gitignore --lai 2 . --sg \"Data/*\" --sg \"inputs/*\" --sg \"model_assets/*\" --sg \"static/*\"",
"check", "check",
] ]

View File

@@ -236,7 +236,11 @@ def create_dataset_app() -> gr.Blocks:
outputs=[result2], outputs=[result2],
) )
use_hf_whisper.change( use_hf_whisper.change(
lambda x: (gr.update(visible=x), gr.update(visible=not x), gr.update(visible=not x)), lambda x: (
gr.update(visible=x),
gr.update(visible=not x),
gr.update(visible=not x),
),
inputs=[use_hf_whisper], inputs=[use_hf_whisper],
outputs=[batch_size, compute_type, device], outputs=[batch_size, compute_type, device],
) )

View File

@@ -6,12 +6,12 @@ import gradio as gr
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import numpy as np import numpy as np
import yaml import yaml
from config import config
from scipy.spatial.distance import pdist, squareform from scipy.spatial.distance import pdist, squareform
from sklearn.cluster import DBSCAN, AgglomerativeClustering, KMeans from sklearn.cluster import DBSCAN, AgglomerativeClustering, KMeans
from sklearn.manifold import TSNE from sklearn.manifold import TSNE
from umap import UMAP from umap import UMAP
from config import config
from style_bert_vits2.constants import DEFAULT_STYLE, GRADIO_THEME from style_bert_vits2.constants import DEFAULT_STYLE, GRADIO_THEME
from style_bert_vits2.logging import logger from style_bert_vits2.logging import logger