Spaces:
Build error
Build error
bug gfix
Browse files
app.py
CHANGED
|
@@ -292,10 +292,10 @@ def predict_and_analyze(model_name, num_channels, dim, input_channel, image):
|
|
| 292 |
stochastic_depth_prob=hparams.stochastic_depth_prob,
|
| 293 |
width_mult=hparams.width_mult,
|
| 294 |
depth_mult=hparams.depth_mult,)
|
| 295 |
-
model_url = cached_download(hf_hub_url(model_loading_name, filename="pytorch_model.bin"))
|
| 296 |
# print(model_url)
|
| 297 |
|
| 298 |
-
loaded = torch.load(model_url, map_location='cpu')
|
| 299 |
print(loaded)
|
| 300 |
|
| 301 |
model.load_state_dict(loaded)
|
|
|
|
| 292 |
stochastic_depth_prob=hparams.stochastic_depth_prob,
|
| 293 |
width_mult=hparams.width_mult,
|
| 294 |
depth_mult=hparams.depth_mult,)
|
| 295 |
+
model_url = cached_download(hf_hub_url(model_path + model_loading_name, filename="pytorch_model.bin"))
|
| 296 |
# print(model_url)
|
| 297 |
|
| 298 |
+
loaded = torch.load(model_url, map_location='cpu', )
|
| 299 |
print(loaded)
|
| 300 |
|
| 301 |
model.load_state_dict(loaded)
|