I got “Missing init method in main.py file” this error when I am uploading an external ML package into the AI center.
1 Like
Hi @Sukanya_Dutta
kindly check out this links
hope this helps you
Thanks
Hi @Sukanya_Dutta
could you check .py file before uploading
main.py
import joblib
import json
class Main(object):
def init(self):
self.model = joblib.load(‘finalized_model.sav’)
def predict(self, X):
X = json.loads(X)
result = self.model.predict_proba(X)
return json.dumps(result.tolist())