Edit model card

Cat Image Classifier

This model classifies whether an input image contains a cat or not. You can use the model through:

  1. The interface above - just upload an image and get predictions
  2. Programmatically using the code below

Programmatic Usage

from fastai.learner import load_learner
from huggingface_hub import hf_hub_download

# Download the model
model_path = hf_hub_download(repo_id="RamyKhorshed/Lesson2FastAi", filename="model.pkl")
model = load_learner(model_path)

# Make a prediction
img_path = "path/to/your/image.jpg"
pred, pred_idx, probs = model.predict(img_path)
print(f"Prediction: {pred}")
print(f"Confidence: {probs[pred_idx]:.4f}")
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Space using RamyKhorshed/Lesson2FastAi 1