-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Hello,
I want to save a model which is trained in the GUI and load it afterwards in Python to deploy it as a microservice.
I saved the model as .pkcls File and loaded it into Python. When I try to run the predict function, it gets an ValueError.
How can I access the preprocessing processes that is done in the GUI?
And How do I integrate the preprocessing in my python-script?
import pickle
import Orange
import numpy as np
with open('naive-bayers.pkcls', 'rb') as f:
mp = pickle.load(f)
print(mp)
arguments = np.array([521, 24, 'female', 2, 'own', 'little','little', 3190, 18, 'radio/TV']).reshape(1, -1)
print(arguments)
>>> [['521' '24' 'female' '2' 'own' 'little' 'little' '3190' '18' 'radio/TV']]
print(mp.predict(arguments))
>>> ValueError: Unable to convert array of bytes/strings into decimal numbers with dtype='numeric'
Metadata
Metadata
Assignees
Labels
No labels