mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-05-06 20:01:37 +08:00
chore(format): run black on dev
This commit is contained in:
parent
b3215d126c
commit
40d4e4d406
@ -1536,9 +1536,7 @@ with gr.Blocks(title="RVC WebUI") as app:
|
||||
)
|
||||
with gr.Row():
|
||||
with gr.Column():
|
||||
ckpt_path1 = gr.File(
|
||||
label=i18n("模型路径")
|
||||
)
|
||||
ckpt_path1 = gr.File(label=i18n("模型路径"))
|
||||
but8 = gr.Button(i18n("查看"), variant="primary")
|
||||
with gr.Column():
|
||||
info6 = gr.Textbox(label=i18n("输出信息"), value="")
|
||||
|
@ -47,6 +47,7 @@ def original_audio_time_minus():
|
||||
def original_audio_freq_minus():
|
||||
return original_audio_storage()["f"]
|
||||
|
||||
|
||||
@singleton_variable
|
||||
def original_rmvpe_f0():
|
||||
x = original_audio_storage()
|
||||
|
@ -25,13 +25,27 @@ def show_model_info(cpt, show_long_id=False):
|
||||
+ ")"
|
||||
)
|
||||
sim = hash_similarity(h, hread)
|
||||
if not isinstance(sim, str): sim = "%.2f%%" % (sim*100)
|
||||
if not isinstance(sim, str):
|
||||
sim = "%.2f%%" % (sim * 100)
|
||||
if not show_long_id:
|
||||
h = i18n("不显示")
|
||||
if h != hread:
|
||||
h = i18n("相似度") + " " + sim + " -> " + h
|
||||
elif h != hread:
|
||||
h = i18n("相似度") + " " + sim + " -> " + h + "(" + i18n("实际计算") + "), " + hread + "(" + i18n("从模型中读取") + ")"
|
||||
h = (
|
||||
i18n("相似度")
|
||||
+ " "
|
||||
+ sim
|
||||
+ " -> "
|
||||
+ h
|
||||
+ "("
|
||||
+ i18n("实际计算")
|
||||
+ "), "
|
||||
+ hread
|
||||
+ "("
|
||||
+ i18n("从模型中读取")
|
||||
+ ")"
|
||||
)
|
||||
txt = f"""{i18n("模型名")}: %s
|
||||
{i18n("封装时间")}: %s
|
||||
{i18n("模型作者")}: %s
|
||||
@ -59,7 +73,8 @@ def show_model_info(cpt, show_long_id=False):
|
||||
|
||||
def show_info(path):
|
||||
try:
|
||||
if hasattr(path, "name"): path = path.name
|
||||
if hasattr(path, "name"):
|
||||
path = path.name
|
||||
a = torch.load(path, map_location="cpu")
|
||||
txt = show_model_info(a, show_long_id=True)
|
||||
del a
|
||||
|
Loading…
x
Reference in New Issue
Block a user