Image Classification
Transformers
PyTorch
English
emotion-detection
facial-expressio
deep-learning
cnn
Instructions to use ravi86/mood_detector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ravi86/mood_detector with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="ravi86/mood_detector") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ravi86/mood_detector", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -100,10 +100,10 @@ git clone https://github.com/TRavi8688/Mood-Based-Music-Player
|
|
| 100 |
cd mood_detector
|
| 101 |
|
| 102 |
##🧪 How to Use (Transformers-based)
|
| 103 |
-
|
| 104 |
Follow these steps to preprocess an image and predict facial expression using the pre-trained Transformers-based model:
|
| 105 |
Python
|
| 106 |
-
|
| 107 |
from transformers import AutoModelForImageClassification, AutoImageProcessor
|
| 108 |
from PIL import Image
|
| 109 |
import torch
|
|
|
|
| 100 |
cd mood_detector
|
| 101 |
|
| 102 |
##🧪 How to Use (Transformers-based)
|
| 103 |
+
|
| 104 |
Follow these steps to preprocess an image and predict facial expression using the pre-trained Transformers-based model:
|
| 105 |
Python
|
| 106 |
+
```bash
|
| 107 |
from transformers import AutoModelForImageClassification, AutoImageProcessor
|
| 108 |
from PIL import Image
|
| 109 |
import torch
|