# Refund Request Classifier This repository contains a logistic regression model developed to classify whether an email is a **response to a refund request** or **not**. --- ## 🚀 Quick Start ```python from huggingface_hub import hf_hub_download import joblib # Load Model model_path = hf_hub_download( repo_id="Settlemate/refund-request-classifier", filename="refund_request_classifier.pkl" ) # Get Pipeline and Threshold bundle = joblib.load(model_path) pipeline = bundle["pipeline"] threshold = bundle["threshold"] # Functions to use the classifier def classify_refund_request(subject: str, body: str) -> bool: text = f"{subject} {body}" proba = pipeline.predict_proba([text])[0, 1] return "refund-request" if proba >= threshold else "non-refund-request" # Example usage if __name__ == "__main__": subject = "Order Order #210023: protocol REF-7701 assigned" body = """

Protocol generated: REF-7701

Protocol REF-7701 has been issued for your refund request.

Status updates will be provided within 4 business days.

Check for updates by logging into our website.

Our customer care team is available for clarifications.

Sincerely,
QuickMart Support Team

""" print(classify_refund_request(subject, body)) ``` --- > **Note:** This model was trained using the dataset, split into training, validation, and test sets.