Skip to content
Snippets Groups Projects
Commit 8445d3e4 authored by Campos Cordobes, Sergio's avatar Campos Cordobes, Sergio
Browse files

Update src/modelo NN.pkcls, src/simulation_model.py

parent 8aaaa363
Branches
No related tags found
No related merge requests found
File added
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on: 16/01/2023
Sergio Campos 02-03/2023
"""
import math
import pickle
import Orange
import numpy as np
import json
from src import constants
import sys
print(sys.path)
from src import constants, utils
def simulation_model_getClousure_KPIs(cnx, request):
try:
with open('modelo NN.pkcls', 'rb') as f:
mp = pickle.load(f)
print(mp)
arguments = np.array([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64]).reshape(1, -1)
res = mp.predict(arguments)
kpi = res[0]
print (res)
return str(kpi)
except:
return constants.ERROR_EXCEPTION
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment