Downloads · 30 days
5
11% of all-time downloads
harriskr14/garbage_classifier
garbage_classifier is a text classification model from harriskr14. Use it when you need a label for a piece of text. It is set up for timm. The card lists the license as mit.
This model has been pushed to the Hub using the PytorchModelHubMixin integration: - Code: https://huggingface.co/harriskr14/garbageclassifier - Paper: [More Information Needed] - Docs: [More Information Needed]
Downloads · 30 days
5
11% of all-time downloads
All-time downloads
46
Public
Parameters
85.8M
343 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors343 MB · 100%
From the Hugging Face model README
This model has been pushed to the Hub using the PytorchModelHubMixin integration:
Write this following code on your file:
app.py
def build_model(num_classes=10):
config = get_config()
model_name = 'vit_base_patch16_224'
model = timm.create_model(model_name, pretrained=True, num_classes=num_classes)
return model
class MyModel(nn.Module, PyTorchModelHubMixin, repo_url="https://huggingface.co/harriskr14/garbage_classifier", pipeline_tag="text-classification", license="mit"):
def __init__(self, num_classes=10):
super(MyModel, self).__init__()
self.model = build_model(num_classes=num_classes)
def forward(self, x):
return self.model(x)
model = MyModel()
model.from_pretrained("harriskr14/garbage_classifier")