Update app.py
Browse files
app.py
CHANGED
@@ -42,6 +42,7 @@ class model:
|
|
42 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
43 |
if self.model_name != model_name:
|
44 |
self.model_name = model_name
|
|
|
45 |
if self.model_name not in self.model_dict.keys():
|
46 |
model_ckpt_path = hf_hub_download(repo_id=f"HuangLab/{model_name}", filename="model.ckpt")
|
47 |
model_config_path = hf_hub_download(repo_id=f"HuangLab/{model_name}", filename="config.yaml")
|
|
|
42 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
43 |
if self.model_name != model_name:
|
44 |
self.model_name = model_name
|
45 |
+
del self.model
|
46 |
if self.model_name not in self.model_dict.keys():
|
47 |
model_ckpt_path = hf_hub_download(repo_id=f"HuangLab/{model_name}", filename="model.ckpt")
|
48 |
model_config_path = hf_hub_download(repo_id=f"HuangLab/{model_name}", filename="config.yaml")
|