From 4f6c3b7370f2e09e71866351aaa0516a1dba0c27 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 27 Jan 2026 19:28:12 +0100 Subject: [PATCH] created low code script for model deployment --- predict_pipeline/predict_sample.py | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 predict_pipeline/predict_sample.py diff --git a/predict_pipeline/predict_sample.py b/predict_pipeline/predict_sample.py new file mode 100644 index 0000000..7951c39 --- /dev/null +++ b/predict_pipeline/predict_sample.py @@ -0,0 +1,43 @@ +# Imports +import pandas as pd +import json +from pathlib import Path +import numpy as np + +def getLastEntryFromSQLite(): + + return + +def callModel(sample): + prediction: np.int32 = sample # noch unklar ob jedes mal ein load oder z.B. mit Flask API + return prediction + +def getMessageConfig( config_file_path): + + return dict() + + +def buildMessage(result: np.int32, config: dict): + # message =json... + message = 5 + return message + + +def sendMessage(destination, message): + return 2 + +def main(): + config_file_path = Path("") + config = getMessageConfig(config_file_path=config_file_path) + + sample = getLastEntryFromSQLite() + + prediction = callModel(sample=sample) + + message = buildMessage(result=prediction, config=config) + + sendMessage(config, message) + + +if __name__ == "__main__": + main() \ No newline at end of file