repair app.py

This commit is contained in:
Ftps
2023-08-27 19:49:18 +09:00
parent 3f3177b5ce
commit 9a10795908
2 changed files with 33 additions and 192 deletions

View File

@@ -29,7 +29,9 @@ class VC:
self.config = config
def get_vc(self, sid, to_return_protect0, to_return_protect1):
def get_vc(self, sid, *to_return_protect):
print("aosdijfaofjoaij")
print(to_return_protect)
person = f'{os.getenv("weight_root")}/{sid}'
print(f"loading {person}")
@@ -41,12 +43,16 @@ class VC:
to_return_protect0 = {
"visible": self.if_f0 != 0,
"value": to_return_protect0 if self.if_f0 != 0 else 0.5,
"value": to_return_protect[0]
if self.if_f0 != 0 and to_return_protect
else 0.5,
"__type__": "update",
}
to_return_protect1 = {
"visible": self.if_f0 != 0,
"value": to_return_protect1 if self.if_f0 != 0 else 0.33,
"value": to_return_protect[1]
if self.if_f0 != 0 and to_return_protect
else 0.33,
"__type__": "update",
}
@@ -75,11 +81,15 @@ class VC:
index = {"value": get_index_path_from_model(sid), "__type__": "update"}
return (
{"visible": True, "maximum": n_spk, "__type__": "update"},
to_return_protect0,
to_return_protect1,
index,
index,
(
{"visible": True, "maximum": n_spk, "__type__": "update"},
to_return_protect0,
to_return_protect1,
index,
index,
)
if to_return_protect
else {"visible": True, "maximum": n_spk, "__type__": "update"}
)
def vc_single(