In Azure ML Studio, we have the option of choosing a number of inbuilt ML models like Classification, Regression, etc. , which we can drag and drop to our workflow.
My question is, can I upload a custom ML model that I have built locally on my system in Python, and add it to the workflow?
import pandas as pd
import sys
import pickle
def azureml_main(dataframe1 = None, dataframe2 = None):
sys.path.insert(0,".\Script Bundle")
model = pickle.load(open(".\Script Bundle\model.pkl", 'rb'))
pred = model.predict(dataframe1)
return pd.DataFrame([pred[0]])
Update
If you want to declare this experiment as an API you need to add web input and output to the Python script module.