Update hubconf.py
Browse files- hubconf.py +3 -2
hubconf.py
CHANGED
|
@@ -19,7 +19,8 @@ def geonet(pretrained=False, map_location="cpu"):
|
|
| 19 |
repo_id="ayda138000/DualMaxwell",
|
| 20 |
filename="geonet_real_v30.zip" # نام فایل زیپ شما
|
| 21 |
)
|
| 22 |
-
|
|
|
|
| 23 |
# ۲. باز کردن فایل زیپ
|
| 24 |
with zipfile.ZipFile(zip_file_path, 'r') as zf:
|
| 25 |
# !!! اخطار: این نام باید دقیقاً نام فایل .pth داخل زیپ باشد
|
|
@@ -47,7 +48,7 @@ def maxwell(pretrained=False, map_location="cpu"):
|
|
| 47 |
# اصلاح شد: از v34 به v31 تغییر کرد تا با فایل آپلود شده شما مطابقت داشته باشد
|
| 48 |
file_path = hf_hub_download(
|
| 49 |
repo_id="ayda138000/DualMaxwell",
|
| 50 |
-
filename="physnet_v31_real.
|
| 51 |
)
|
| 52 |
model.load_state_dict(torch.load(file_path, map_location=map_location))
|
| 53 |
return model
|
|
|
|
| 19 |
repo_id="ayda138000/DualMaxwell",
|
| 20 |
filename="geonet_real_v30.zip" # نام فایل زیپ شما
|
| 21 |
)
|
| 22 |
+
|
| 23 |
+
|
| 24 |
# ۲. باز کردن فایل زیپ
|
| 25 |
with zipfile.ZipFile(zip_file_path, 'r') as zf:
|
| 26 |
# !!! اخطار: این نام باید دقیقاً نام فایل .pth داخل زیپ باشد
|
|
|
|
| 48 |
# اصلاح شد: از v34 به v31 تغییر کرد تا با فایل آپلود شده شما مطابقت داشته باشد
|
| 49 |
file_path = hf_hub_download(
|
| 50 |
repo_id="ayda138000/DualMaxwell",
|
| 51 |
+
filename="physnet_v31_real.pths"
|
| 52 |
)
|
| 53 |
model.load_state_dict(torch.load(file_path, map_location=map_location))
|
| 54 |
return model
|