mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-05-07 04:09:06 +08:00
feat(web): support uploading file in model info
This commit is contained in:
parent
ee72eca6a5
commit
8ed0dec181
@ -1536,8 +1536,8 @@ with gr.Blocks(title="RVC WebUI") as app:
|
|||||||
)
|
)
|
||||||
with gr.Row():
|
with gr.Row():
|
||||||
with gr.Column():
|
with gr.Column():
|
||||||
ckpt_path1 = gr.Textbox(
|
ckpt_path1 = gr.File(
|
||||||
label=i18n("模型路径"), value="", interactive=True
|
label=i18n("模型路径")
|
||||||
)
|
)
|
||||||
but8 = gr.Button(i18n("查看"), variant="primary")
|
but8 = gr.Button(i18n("查看"), variant="primary")
|
||||||
with gr.Column():
|
with gr.Column():
|
||||||
|
@ -63,6 +63,7 @@ def show_model_info(cpt, show_long_id=False):
|
|||||||
|
|
||||||
def show_info(path):
|
def show_info(path):
|
||||||
try:
|
try:
|
||||||
|
if hasattr(path, "name"): path = path.name
|
||||||
a = torch.load(path, map_location="cpu")
|
a = torch.load(path, map_location="cpu")
|
||||||
txt = show_model_info(a, show_long_id=True)
|
txt = show_model_info(a, show_long_id=True)
|
||||||
del a
|
del a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user