aboutsummaryrefslogtreecommitdiffstats
path: root/look2hear/models/base_model.py
diff options
context:
space:
mode:
Diffstat (limited to 'look2hear/models/base_model.py')
-rw-r--r--look2hear/models/base_model.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/look2hear/models/base_model.py b/look2hear/models/base_model.py
index 89b36ad..730194d 100644
--- a/look2hear/models/base_model.py
+++ b/look2hear/models/base_model.py
@@ -7,6 +7,8 @@
import torch
import torch.nn as nn
+from huggingface_hub import PyTorchModelHubMixin
+
def _unsqueeze_to_3d(x):
"""Normalize shape of `x` to [batch, n_chan, time]."""
@@ -32,7 +34,7 @@ def pad_to_appropriate_length(x, lcm):
return x
-class BaseModel(nn.Module):
+class BaseModel(nn.Module, PyTorchModelHubMixin, repo_url="https://github.com/JusperLee/Apollo", pipeline_tag="audio-to-audio"):
def __init__(self, sample_rate, in_chan=1):
super().__init__()
self._sample_rate = sample_rate