Image Classification
torch
DanielCruz09 commited on
Commit
4b502fa
·
verified ·
1 Parent(s): 91e318d

Delete models/upload_model.py

Browse files
Files changed (1) hide show
  1. 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
- )