import os
import joblib

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
MODEL_PATH = os.path.join(BASE_DIR, "artifacts", "persuasive_model.joblib")

def main():
    model = joblib.load(MODEL_PATH)

    tests = [
        "I strongly recommend using this approach for better results.",
        "This document explains the training procedure in detail.",
        "You should consider revisiting the design.",
        "The paper describes the experimental setup."
    ]

    for t in tests:
        pred = model.predict(t)
        label = "Persuasive" if pred == 1 else "Informative"
        print(f"{label} → {t}")

if __name__ == "__main__":
    main()
