UB2002's picture
final commmits
a08e3d4
Raw History Blame Contribute Delete
339 Bytes
import joblib
from typing import Tuple
# Load saved pipeline
try:
pipeline = joblib.load('model.joblib')
except FileNotFoundError:
raise RuntimeError("file not found error")
def classify_email(text: str) -> str:
"""
Given masked email text, returns predicted category label.
"""
return pipeline.predict([text])[0]