email-assistant-env / app /classifier.py
Gaurav3134's picture
Upload folder using huggingface_hub
6d5321f verified
Raw
History Blame Contribute Delete
369 Bytes
from __future__ import annotations
from .ai_engine import AIEngine
class EmailClassifier:
def __init__(self, ai_engine: AIEngine) -> None:
self.ai_engine = ai_engine
async def classify(self, *, subject: str, from_email: str, body: str) -> dict:
return await self.ai_engine.classify_intent(subject=subject, from_email=from_email, body=body)