43 lines
826 B
Python
43 lines
826 B
Python
# 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() |