Skip to content

Hogwarts sorting hat

Hogwarts sorting hat

import marvin

student = "Brave, daring, chivalrous, and sometimes a bit reckless."

house = marvin.classify(
    student,
    labels=["Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin"]
)

Welcome to Gryffindor!

assert house == "Gryffindor"