https://github.com/semihdervis/cat-emotion-classifier
Streamlit application that classifies the emotions of cats from uploaded images.
https://github.com/semihdervis/cat-emotion-classifier
emotion-classification streamlit vision-transformer
Last synced: 5 months ago
JSON representation
Streamlit application that classifies the emotions of cats from uploaded images.
- Host: GitHub
- URL: https://github.com/semihdervis/cat-emotion-classifier
- Owner: semihdervis
- License: mit
- Created: 2024-09-13T03:50:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-13T14:54:39.000Z (over 1 year ago)
- Last Synced: 2025-01-22T08:37:35.793Z (over 1 year ago)
- Topics: emotion-classification, streamlit, vision-transformer
- Language: Python
- Homepage: https://cat-emotion-classifier.streamlit.app/
- Size: 479 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://cat-emotion-classifier.streamlit.app/).
## Examples



## 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:
```sh
git clone https://github.com/semihdervis/cat-emotion-classifier.git
cd cat-emotion-classifier
```
2. Create a virtual environment and activate it:
```sh
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
```
3. Install the required dependencies:
```sh
pip install -r requirements.txt
```
## Usage
1. Run the Streamlit app:
```sh
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`](https://huggingface.co/semihdervis/cat-emotion-classifier).
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.