update to use v15 model
Browse files
app.py
CHANGED
|
@@ -46,11 +46,11 @@ num_labels = len(labels)
|
|
| 46 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 47 |
|
| 48 |
hf_token = os.getenv('HF_token')
|
| 49 |
-
model_path = hf_hub_download(repo_id="samfhy/morphmarket_model", filename="
|
| 50 |
checkpoint = torch.load(model_path, map_location=device)
|
| 51 |
|
| 52 |
# Load per-class optimized thresholds
|
| 53 |
-
thresholds_path = hf_hub_download(repo_id="samfhy/morphmarket_model", filename="
|
| 54 |
with open(thresholds_path, 'r') as f:
|
| 55 |
optimal_thresholds = json.load(f)
|
| 56 |
|
|
|
|
| 46 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 47 |
|
| 48 |
hf_token = os.getenv('HF_token')
|
| 49 |
+
model_path = hf_hub_download(repo_id="samfhy/morphmarket_model", filename="model_v15_epoch18.pt", token=hf_token)
|
| 50 |
checkpoint = torch.load(model_path, map_location=device)
|
| 51 |
|
| 52 |
# Load per-class optimized thresholds
|
| 53 |
+
thresholds_path = hf_hub_download(repo_id="samfhy/morphmarket_model", filename="optimal_thresholds_v15.json", token=hf_token)
|
| 54 |
with open(thresholds_path, 'r') as f:
|
| 55 |
optimal_thresholds = json.load(f)
|
| 56 |
|