Update README.md
Browse files
README.md
CHANGED
|
@@ -4,7 +4,6 @@ license: cc-by-4.0
|
|
| 4 |
|
| 5 |
# This model doesn't inherit huggingface/transformers so it needs to be downloaded
|
| 6 |
```
|
| 7 |
-
wget https://huggingface.co/Lancelot53/icon_classifier_maxvit/blob/main/id_2_class_89.json
|
| 8 |
wget https://huggingface.co/Lancelot53/icon_classifier_maxvit/blob/main/best_model_89.pth
|
| 9 |
```
|
| 10 |
|
|
@@ -19,9 +18,7 @@ import torch.nn.functional as F
|
|
| 19 |
#load id_2_class.json
|
| 20 |
import json
|
| 21 |
|
| 22 |
-
|
| 23 |
-
id_2_class = json.load(json_file)
|
| 24 |
-
|
| 25 |
#make class_2_id dict
|
| 26 |
|
| 27 |
class_2_id = {}
|
|
|
|
| 4 |
|
| 5 |
# This model doesn't inherit huggingface/transformers so it needs to be downloaded
|
| 6 |
```
|
|
|
|
| 7 |
wget https://huggingface.co/Lancelot53/icon_classifier_maxvit/blob/main/best_model_89.pth
|
| 8 |
```
|
| 9 |
|
|
|
|
| 18 |
#load id_2_class.json
|
| 19 |
import json
|
| 20 |
|
| 21 |
+
id_2_class = {"0": "back", "1": "Briefcase", "2": "Call", "3": "Camera", "4": "Circle", "5": "Cloud", "6": "delete", "7": "Down", "8": "edit", "9": "Export", "10": "Face", "11": "Folder", "12": "Globe", "13": "Google", "14": "Heart", "15": "Home", "16": "Image", "17": "Import", "18": "Info", "19": "Link", "20": "Location", "21": "Mail", "22": "menu", "23": "Merge", "24": "Message", "25": "Microphone", "26": "more", "27": "Music", "28": "Mute", "29": "Person", "30": "Phone", "31": "plus", "32": "QRCODE", "33": "Refresh", "34": "search", "35": "settings", "36": "share", "37": "Star", "38": "Tick", "39": "Up", "40": "vidCam", "41": "Video", "42": "Volume"}
|
|
|
|
|
|
|
| 22 |
#make class_2_id dict
|
| 23 |
|
| 24 |
class_2_id = {}
|