Skip to content

Commit

Permalink
Create ai_service.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Aug 7, 2024
1 parent 939895a commit 1e78cdc
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from models.ai_model import AIModel

class AIService:
def __init__(self, ai_model: AIModel):
self.ai_model = ai_model

def predict(self, data: pd.DataFrame) -> pd.Series:
return self.ai_model.predict(data)

def evaluate(self, data: pd.DataFrame) -> float:
return self.ai_model.evaluate(data)

def train(self, data: pd.DataFrame) -> None:
self.ai_model.train(data)

0 comments on commit 1e78cdc

Please sign in to comment.