Spaces:
Runtime error
Runtime error
Commit
·
89d1722
1
Parent(s):
0c221a6
Auto deploy
Browse files- stCompressService.py +1 -1
stCompressService.py
CHANGED
@@ -21,7 +21,7 @@ MODELS_URL = "https://github.com/xiaosu-zhu/McQuic/releases/download/generic/qp_
|
|
21 |
|
22 |
@st.experimental_singleton
|
23 |
def loadModel(qp: int, local: pathlib.Path, device, mse: bool):
|
24 |
-
ckpt = torch.hub.load_state_dict_from_url(MODELS_URL, map_location=device)
|
25 |
|
26 |
config = Config.deserialize(ckpt["config"])
|
27 |
model = Compressor(**config.Model.Params).to(device)
|
|
|
21 |
|
22 |
@st.experimental_singleton
|
23 |
def loadModel(qp: int, local: pathlib.Path, device, mse: bool):
|
24 |
+
ckpt = torch.hub.load_state_dict_from_url(MODELS_URL, map_location=device, check_hash=True)
|
25 |
|
26 |
config = Config.deserialize(ckpt["config"])
|
27 |
model = Compressor(**config.Model.Params).to(device)
|