deeplearn / README_HuggingFace.md
sharshar1's picture
Upload 6 files
eb2e1fc verified
---
title: Emoji Predictor API
emoji: πŸ˜„
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
license: mit
---
# 🎯 Emoji Predictor API
Predict the appropriate emoji for any English sentence using LSTM deep learning model.
## πŸš€ API Endpoints
### Health Check
```
GET /
GET /health
```
### Predict Single Text
```
POST /predict
Content-Type: application/json
{
"text": "I love you"
}
```
**Response:**
```json
{
"text": "I love you",
"emoji": "❀️",
"emoji_meaning": "love",
"confidence": 0.95,
"all_predictions": {
"❀️": {"probability": 0.95, "meaning": "love"},
"⚾": {"probability": 0.01, "meaning": "sports"},
"πŸ˜„": {"probability": 0.02, "meaning": "happy"},
"😞": {"probability": 0.01, "meaning": "sad"},
"🍴": {"probability": 0.01, "meaning": "food"}
}
}
```
### Predict Batch
```
POST /predict/batch
Content-Type: application/json
["I love you", "I am hungry", "Let's play baseball"]
```
## πŸ“Š Supported Emojis
| Emoji | Meaning |
|-------|---------|
| ❀️ | Love |
| ⚾ | Sports |
| πŸ˜„ | Happy |
| 😞 | Sad |
| 🍴 | Food |
## πŸ”§ Technology Stack
- FastAPI
- TensorFlow/Keras
- LSTM Neural Network
- GloVe Word Embeddings