darksakura commited on
Commit
4a01a5d
1 Parent(s): 54802d5

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -127,6 +127,7 @@ def change_audio(audio,vc):
127
  def loadmodel(model_):
128
  global model
129
  model_name = os.path.splitext(os.path.basename(model_))[0]
 
130
  if os.path.exists("./kmeans/" + model_name + ".pt") == True:
131
  model = Svc(model_, "configs/" + model_name + ".json", cluster_model_path="./kmeans/" + model_name + ".pt")
132
  else:
 
127
  def loadmodel(model_):
128
  global model
129
  model_name = os.path.splitext(os.path.basename(model_))[0]
130
+ model.unload_model()
131
  if os.path.exists("./kmeans/" + model_name + ".pt") == True:
132
  model = Svc(model_, "configs/" + model_name + ".json", cluster_model_path="./kmeans/" + model_name + ".pt")
133
  else: