Skip to content

semihdervis/cat-emotion-classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cat Emotion Classifier

This is a Streamlit application that classifies the emotions of cats from uploaded images using a Vision Transformer (ViT) model.

You can try the application here.

Examples

Angry Cat

Scared Cat

Surprised Cat

Features

  • Upload an image of a cat and classify its emotion.
  • Display the uploaded image.
  • Show the classification results as a horizontal bar chart with confidence scores for each class.

Installation

  1. Clone the repository:

    git clone https://github.com/semihdervis/cat-emotion-classifier.git
    cd cat-emotion-classifier
  2. Create a virtual environment and activate it:

    python -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
  3. Install the required dependencies:

    pip install -r requirements.txt

Usage

  1. Run the Streamlit app:

    streamlit run app.py
  2. Open your web browser and go to http://localhost:8501.

  3. Upload an image of a cat and click the "Classify Image" button to see the classification results.

    Note: The first prediction may take some time as the Vision Transformer (ViT) model needs to be loaded from Hugging Face.

Model

The application uses a Vision Transformer (ViT) model fine-tuned for cat emotion classification, available on Hugging Face as semih-dervis/cat-emotion-classifier.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Streamlit application that classifies the emotions of cats from uploaded images.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages