Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pprint import pprint
- def main():
- data = load_email_data("spam.json", "ham.json")
- train, test = train_test_split(data)
- # print(data)
- model = train_nb(train)
- # pprint(model)
- evaluate_model(model, test)
- fetch_unread_emails_from_label(model)
- # while True:
- # user_input = input("Wpisz wiadomość do klasyfikacji (lub 'q' aby zakończyć): ")
- # if user_input.lower() == 'q':
- # break
- # prediction = predict(model, user_input)
- # print(f"Klasyfikacja: {prediction.upper()}")
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement