Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -28,7 +28,7 @@ class MultiTaskModel(nn.Module):
|
|
| 28 |
# 2. Reconstruct the Model and Load Weights
|
| 29 |
########################################
|
| 30 |
# Set the number of object classes (update this to match your training)
|
| 31 |
-
num_obj_classes = 139 # Example value;
|
| 32 |
|
| 33 |
device = torch.device("cpu")
|
| 34 |
|
|
@@ -43,7 +43,7 @@ model.to(device)
|
|
| 43 |
|
| 44 |
# Download the state dict from HF Hub.
|
| 45 |
repo_id = "Abdu07/multitask-model" # Your repo name
|
| 46 |
-
filename = "
|
| 47 |
weights_path = hf_hub_download(repo_id=repo_id, filename=filename)
|
| 48 |
|
| 49 |
# Load the state dict and update the model.
|
|
|
|
| 28 |
# 2. Reconstruct the Model and Load Weights
|
| 29 |
########################################
|
| 30 |
# Set the number of object classes (update this to match your training)
|
| 31 |
+
num_obj_classes = 139 # Example value; update as needed
|
| 32 |
|
| 33 |
device = torch.device("cpu")
|
| 34 |
|
|
|
|
| 43 |
|
| 44 |
# Download the state dict from HF Hub.
|
| 45 |
repo_id = "Abdu07/multitask-model" # Your repo name
|
| 46 |
+
filename = "Yolloplusclassproject_weights.pth" # New weight file name
|
| 47 |
weights_path = hf_hub_download(repo_id=repo_id, filename=filename)
|
| 48 |
|
| 49 |
# Load the state dict and update the model.
|