File size: 1,322 Bytes
eb2e1fc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | ---
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
|