14 lines
295 B
Python
14 lines
295 B
Python
import json
|
|
import mlflow
|
|
import sys
|
|
|
|
input = sys.argv[1]
|
|
|
|
logged_model = 'mlruns/1/3630068c31924c05a9a04e70ef35e0b8/artifacts/s444409'
|
|
loaded_model = mlflow.pyfunc.load_model(logged_model)
|
|
|
|
|
|
with open(f'{logged_model}/'+input) as f:
|
|
data = json.load(f)
|
|
|
|
loaded_model.predict(data['inputs']) |