import pickle
from Forums.Classifier.transformer import load

title_transformer_file = r"..\Classifier\topic_title_transformer.pickle.new"
content_transformer_file = r"..\Classifier\topic_content_transformer.pickle.new"
classifier_file = r"..\Classifier\forum_mlp.pickle"

with open(classifier_file, 'rb') as f:
    clf = pickle.load(f)

title_transformer = load(title_transformer_file)
print(title_transformer.ngram_list)

content_transformer = load(content_transformer_file)
print(content_transformer.ngram_list)

X_1 = title_transformer.transform("Anubis banking botnet v8.0")
X_2 = content_transformer.transform("Anubis 8.0 Android Banking BotNet is a Advance builder modernized and updated. Apk (build) + admin file Download https://anonfiles.com/Naa9M1Ubx9/159_zipPsw CarlosDonCC2022")
print(X_1)
print(X_2)

X = [X_1 + X_2]

result = clf.predict_proba(X)[0]
print(result)
