Delete models/upload_model.py
Browse files- models/upload_model.py +0 -15
models/upload_model.py
DELETED
|
@@ -1,15 +0,0 @@
|
|
| 1 |
-
import torch
|
| 2 |
-
from resnet50 import ResNet50
|
| 3 |
-
from huggingface_hub import HfApi
|
| 4 |
-
|
| 5 |
-
api = HfApi()
|
| 6 |
-
|
| 7 |
-
model = ResNet50(num_classes=4)
|
| 8 |
-
torch.save(model.model.state_dict(), "model_weights.pth")
|
| 9 |
-
|
| 10 |
-
api.upload_file(
|
| 11 |
-
path_or_fileobj="model_weights.pth",
|
| 12 |
-
path_in_repo="model_weights.pth",
|
| 13 |
-
repo_id="DanielCruz09/disaster-image-classifier",
|
| 14 |
-
repo_type="model"
|
| 15 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|