Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available: 6.20.0
metadata
title: Cats vs Dogs Classifier
sdk: gradio
sdk_version: 4.44.1
app_file: app.py
pinned: false
Cats vs Dogs Classifier
Gradio demo Space for an image classifier trained to distinguish cats vs dogs.
Configure
- Put your Keras
.h5model in this repo (recommended:model.h5), or setMODEL_PATH. model_info.jsonis optional, but if present it can provide defaults like class names / preprocessing.- If your model outputs a single sigmoid probability, set
POSITIVE_CLASSto whichever label corresponds to1.0. - If your model needs different input scaling, set
INPUT_SCALEto0_1,minus1_1, or0_255.
Upload to Hugging Face Spaces
- Create a new Space → Gradio (Public).
- Add this repo contents to the Space repo.
- Add your
model.h5.- If it's larger than ~10MB, use Git LFS:
git lfs installgit lfs track "*.h5"- commit the generated
.gitattributes, then commitmodel.h5.
- If it's larger than ~10MB, use Git LFS:
- (Optional) In Space Settings → Variables, set:
CLASS_NAMES(default:cat,dog)INPUT_SCALE(0_1|minus1_1|0_255)POSITIVE_CLASS(only for 1-output sigmoid models)