fxmarty/tiny-testing-remote-code

🤗 Hugging Face sourceimage-classificationapache-2.094 MBother✓ 1 checksumupdated today
Submit in one command

Run it next to your model folder. It makes the torrent, checks your files against Hugging Face, and submits it. You just start seeding and paste your key from your account. It only reads your files and never changes them. Read the script first if you like.

curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo fxmarty/tiny-testing-remote-code ./model-folder
Needs a seeder →

Use at your own risk:

from transformers import AutoFeatureExtractor, AutoModelForImageClassification
from datasets import load_dataset
import torch

feature_extractor = AutoFeatureExtractor.from_pretrained("fxmarty/tiny-testing-remote-code")

model = AutoModelForImageClassification.from_pretrained("fxmarty/tiny-testing-remote-code", trust_remote_code=True)

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

inputs = feature_extractor(image, return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

# model predicts one of the 1000 ImageNet classes
predicted_label = logits.argmax(-1).item()
print(model.config.id2label[predicted_label])