Update upload_to_hf.py
Browse files- upload_to_hf.py +5 -5
upload_to_hf.py
CHANGED
|
@@ -51,7 +51,7 @@ def create_config_json(model_path, version=None):
|
|
| 51 |
|
| 52 |
if version:
|
| 53 |
config["version"] = version
|
| 54 |
-
config["checkpoint_file"] = f"
|
| 55 |
|
| 56 |
return config
|
| 57 |
|
|
@@ -85,12 +85,12 @@ PhaseNet-TF is an advanced deep learning model for automatic seismic phase picki
|
|
| 85 |
This repository contains two versions of the PhaseNet-TF Alaska model:
|
| 86 |
|
| 87 |
### 🔄 Iteration 1
|
| 88 |
-
- **Model File**: `
|
| 89 |
- **Config**: `config_iter1.json`
|
| 90 |
- **Documentation**: [README_iter1.md](README_iter1.md)
|
| 91 |
|
| 92 |
### 🔄 Iteration 2
|
| 93 |
-
- **Model File**: `
|
| 94 |
- **Config**: `config_iter2.json`
|
| 95 |
- **Documentation**: [README_iter2.md](README_iter2.md)
|
| 96 |
|
|
@@ -165,12 +165,12 @@ def upload_model_to_hf(
|
|
| 165 |
|
| 166 |
# Determine file paths based on version
|
| 167 |
if version:
|
| 168 |
-
model_path = f"
|
| 169 |
config_path_in_repo = f"config_{version}.json"
|
| 170 |
readme_path_in_repo = f"README_{version}.md"
|
| 171 |
print(f"Uploading version {version} to {repo_id}")
|
| 172 |
else:
|
| 173 |
-
model_path = "
|
| 174 |
config_path_in_repo = "config.json"
|
| 175 |
readme_path_in_repo = "README.md"
|
| 176 |
print(f"Uploading to {repo_id}")
|
|
|
|
| 51 |
|
| 52 |
if version:
|
| 53 |
config["version"] = version
|
| 54 |
+
config["checkpoint_file"] = f"alaska_{version}.bin"
|
| 55 |
|
| 56 |
return config
|
| 57 |
|
|
|
|
| 85 |
This repository contains two versions of the PhaseNet-TF Alaska model:
|
| 86 |
|
| 87 |
### 🔄 Iteration 1
|
| 88 |
+
- **Model File**: `alaska_iter1.bin`
|
| 89 |
- **Config**: `config_iter1.json`
|
| 90 |
- **Documentation**: [README_iter1.md](README_iter1.md)
|
| 91 |
|
| 92 |
### 🔄 Iteration 2
|
| 93 |
+
- **Model File**: `alaska_iter2.bin`
|
| 94 |
- **Config**: `config_iter2.json`
|
| 95 |
- **Documentation**: [README_iter2.md](README_iter2.md)
|
| 96 |
|
|
|
|
| 165 |
|
| 166 |
# Determine file paths based on version
|
| 167 |
if version:
|
| 168 |
+
model_path = f"alaska_{version}.bin"
|
| 169 |
config_path_in_repo = f"config_{version}.json"
|
| 170 |
readme_path_in_repo = f"README_{version}.md"
|
| 171 |
print(f"Uploading version {version} to {repo_id}")
|
| 172 |
else:
|
| 173 |
+
model_path = "alaska.bin"
|
| 174 |
config_path_in_repo = "config.json"
|
| 175 |
readme_path_in_repo = "README.md"
|
| 176 |
print(f"Uploading to {repo_id}")
|