Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -40,10 +40,10 @@ def load_model(
|
|
40 |
device: str | torch.device = "cuda"
|
41 |
):
|
42 |
enc_path = hf_hub_download(
|
43 |
-
repo_id=pretrained_model_name_or_path, filename=os.path.join(
|
44 |
)
|
45 |
dec_path = hf_hub_download(
|
46 |
-
repo_id=pretrained_model_name_or_path, filename=os.path.join(
|
47 |
)
|
48 |
|
49 |
enc_weight = torch.load(enc_path, weights_only=True)['params_ema']
|
|
|
40 |
device: str | torch.device = "cuda"
|
41 |
):
|
42 |
enc_path = hf_hub_download(
|
43 |
+
repo_id=pretrained_model_name_or_path, filename=os.path.join('GSASR_enhenced_ultra', model_name, 'encoder.pth')
|
44 |
)
|
45 |
dec_path = hf_hub_download(
|
46 |
+
repo_id=pretrained_model_name_or_path, filename=os.path.join('GSASR_enhenced_ultra', model_name, 'decoder.pth')
|
47 |
)
|
48 |
|
49 |
enc_weight = torch.load(enc_path, weights_only=True)['params_ema']
|