Spaces:
Sleeping
Sleeping
metadata
title: GoT House Predictor
emoji: ⚔️
colorFrom: blue
colorTo: red
sdk: docker
pinned: false
Game of Thrones House Predictor
Predict which Game of Thrones house a character belongs to based on their traits and characteristics.
Model
This API uses a Decision Tree Classifier trained on Game of Thrones character data. The model predicts house affiliation based on:
- Region
- Primary role
- Alignment
- Status
- Species
- Character traits (honour, ruthlessness, intelligence, combat skill, diplomacy, leadership)
- Personality traits (loyal, scheming)
API Endpoints
POST /predict
Predict the house affiliation for a character.
Example Request:
{
"region": "The North",
"primary_role": "Commander",
"alignment": "Lawful Good",
"status": "Alive",
"species": "Human",
"honour_1to5": 4,
"ruthlessness_1to5": 2,
"intelligence_1to5": 3,
"combat_skill_1to5": 4,
"diplomacy_1to5": 3,
"leadership_1to5": 4,
"trait_loyal": true,
"trait_scheming": false
}
Example Response:
{
"predicted_house": "Stark",
"confidence": 1.0,
"all_probabilities": {
"Stark": 1.0,
"Lannister": 0.0,
...
}
}
GET /health
Check API health status.
GET /docs
Interactive API documentation (Swagger UI).
Houses
The model can predict the following houses:
- Stark
- Lannister
- Targaryen
- Baratheon
- Greyjoy
- Martell
- Tyrell
- Arryn
- Tully
- Bolton
- Frey
- Mormont
- Tarly
- Night's Watch
- Free Folk
- None/Other
Usage
Visit /docs for interactive API documentation where you can test the predictions directly in your browser.
Deployment
This API is deployed on HuggingFace Spaces using Docker.