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.
- 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.
-
Clone the repository:
git clone https://github.com/semihdervis/cat-emotion-classifier.git cd cat-emotion-classifier -
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the Streamlit app:
streamlit run app.py
-
Open your web browser and go to
http://localhost:8501. -
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.
The application uses a Vision Transformer (ViT) model fine-tuned for cat emotion classification, available on Hugging Face as semih-dervis/cat-emotion-classifier.
This project is licensed under the MIT License. See the LICENSE file for details.


