Views
No views yet
swin_tiny_patch4_window7_224.pip install torch torchvision timm pytorch-lightning albumentations opencv-python-headless scikit-learn Pillow huggingface_hub python-box PyYAMLinference.py, pytorch_model.ckpt, and label_encoder.pkl from this repository.1from inference import load_model_from_hf, load_label_encoder_from_hf, predict_breed
2
3model = load_model_from_hf(repo_id="Hajorda/keduClassifier")
4label_encoder = load_label_encoder_from_hf(repo_id="Hajorda/keduClassifier")
5
6image_path = "path/to/your/pet_image.jpg" # Replace with your image path
7predicted_breed, confidence = predict_breed(image_path, model, label_encoder)
8print(f"Predicted: {predicted_breed}, Confidence: {confidence:.4f}")