Update app.py
Browse files
app.py
CHANGED
@@ -15,8 +15,10 @@ class model:
|
|
15 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
16 |
if self.model_name != model_name:
|
17 |
self.model_name = model_name
|
18 |
-
model_ckpt_path = f"
|
19 |
-
|
|
|
|
|
20 |
|
21 |
# Load model config and set ckpt_path if not provided in config
|
22 |
config = OmegaConf.load(model_config_path)
|
|
|
15 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
16 |
if self.model_name != model_name:
|
17 |
self.model_name = model_name
|
18 |
+
model_ckpt_path = hf_hub_download(repo_id=f"HuangLab/{model_name}", filename="model.ckpt")
|
19 |
+
config_config_path = hf_hub_download(repo_id=f"HuangLab/{model_name}", filename="config.yaml")
|
20 |
+
hf_hub_download(repo_id=f"HuangLab/{model_name}", filename="nucleus_vqgan.yaml")
|
21 |
+
hf_hub_download(repo_id=f"HuangLab/{model_name}", filename="threshold_vqgan.yaml")
|
22 |
|
23 |
# Load model config and set ckpt_path if not provided in config
|
24 |
config = OmegaConf.load(model_config_path)
|