Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -42,12 +42,7 @@ if torch.cuda.is_available():
|
|
42 |
|
43 |
|
44 |
|
45 |
-
# 创建目录 ./trained/wdlm/
|
46 |
-
subprocess.run(["mkdir", "-p", "./trained/wdlm/"])
|
47 |
|
48 |
-
# 切换到目录 ./trained/wdlm/
|
49 |
-
os.chdir("./trained/wdlm/")
|
50 |
-
subprocess.run(["wget", "-O", "G_38400.pth", "https://github.com/00000000002/render/releases/download/ddd/G_38400.pth"])
|
51 |
def upload_mix_append_file(files,sfiles):
|
52 |
|
53 |
try:
|
@@ -143,6 +138,12 @@ def modelUnload():
|
|
143 |
if model is None:
|
144 |
return sid.update(choices = [],value=""),"没有模型需要卸载!"
|
145 |
else:
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
model.unload_model()
|
147 |
model = None
|
148 |
torch.cuda.empty_cache()
|
|
|
42 |
|
43 |
|
44 |
|
|
|
|
|
45 |
|
|
|
|
|
|
|
46 |
def upload_mix_append_file(files,sfiles):
|
47 |
|
48 |
try:
|
|
|
138 |
if model is None:
|
139 |
return sid.update(choices = [],value=""),"没有模型需要卸载!"
|
140 |
else:
|
141 |
+
# 创建目录 ./trained/wdlm/
|
142 |
+
subprocess.run(["mkdir", "-p", "./trained/wdlm/"])
|
143 |
+
|
144 |
+
# 切换到目录 ./trained/wdlm/
|
145 |
+
os.chdir("./trained/wdlm/")
|
146 |
+
subprocess.run(["wget", "-O", "G_38400.pth", "https://github.com/00000000002/render/releases/download/ddd/G_38400.pth"])
|
147 |
model.unload_model()
|
148 |
model = None
|
149 |
torch.cuda.empty_cache()
|