import joblib
import pandas as pd
import sys
import json

def predict():
    model_path = sys.argv[1]
    features_json = sys.stdin.read()
    features_dict = json.loads(features_json)
    
    df = pd.DataFrame([features_dict])
    
    model = joblib.load(model_path)
    
    prediction = model.predict(df)
    print(prediction[0])

if __name__ == "__main__":
    predict()
