import numpy as np
from flask import Flask,request,jsonify
import pickle
app=Flask(__name__)
model=pickle.load(open('model.pkl','rb'))
#@app.route('/api',methods=['POST'])
@app.route('/api',methods=['POST'])
def predict():
  data=request.get_json(force=True)
  predictions=model.predict([[np.array(data['exp'])]])
  output=prediction[0]
  return jsonify(output)
