MCPcopy Create free account
hub / github.com/SeldonIO/seldon-server / extract_input

Function extract_input

python/seldon/microservice/predict.py:7–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5predict_blueprint = Blueprint('predict', __name__)
6
7def extract_input():
8 client = request.args.get('client')
9 if not request.args.get('json') is None:
10 jStr = request.args.get('json')
11 else:
12 jStr = request.form.get('json')
13 j = json.loads(jStr)
14 input = {
15 "client" : client,
16 "json" : j
17 }
18 return input
19
20@predict_blueprint.route('/predict',methods=['GET','POST'])
21def do_predict():

Callers 1

do_predictFunction · 0.70

Calls 1

getMethod · 0.65

Tested by

no test coverage detected