Instructions to use smaranjitghose/big-cat-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use smaranjitghose/big-cat-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="smaranjitghose/big-cat-classifier") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("smaranjitghose/big-cat-classifier") model = AutoModelForImageClassification.from_pretrained("smaranjitghose/big-cat-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download Dockerfile from smaranjitghose/big-cat-classifier: direct link, hf CLI and curl.
- Browser
- Download file 609 Bytes
-
https://huggingface.co/smaranjitghose/big-cat-classifier/resolve/main/Dockerfile
- Command line
-
hf download hf://smaranjitghose/big-cat-classifier/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/smaranjitghose/big-cat-classifier/resolve/main/Dockerfile
609 Bytes
| # Get the base image | |
| FROM python:3.8-slim-buster | |
| #Expose port 8080 | |
| # EXPOSE 8080 | |
| #Copy Requirements.txt file into app directory | |
| COPY requirements.txt app/requirements.txt | |
| #install all requirements in requirements.txt | |
| RUN pip install -r app/requirements.txt | |
| #Copy all files in current directory into app directory | |
| COPY . /app | |
| #Change Working Directory to app directory | |
| WORKDIR /app | |
| # Run the application on port 8080 for Local Host or GCP | |
| # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port 8080", "--server.address 0.0.0.0"] | |
| # Heroku Startup Command | |
| CMD streamlit run app.py --server.port $PORT | |