[data]
This commit is contained in:
parent
e2c7880ca2
commit
55977d9dc4
|
@ -34,11 +34,14 @@ strategies = {
|
|||
|
||||
@app.route("/", methods=["GET", "POST"])
|
||||
def probabilities():
|
||||
if request.method == 'GET':
|
||||
if request.method == "GET":
|
||||
logger.warning("GET request: using default context parameters")
|
||||
phone_data = request.get_json(force=True)
|
||||
logger.debug("phone_data:\n%s", json.dumps(phone_data, indent=2))
|
||||
context = Context(**phone_data)
|
||||
context = Context()
|
||||
else:
|
||||
phone_data = request.get_json(force=True)
|
||||
logger.debug("phone_data:\n%s", json.dumps(phone_data, indent=2))
|
||||
context = Context(**phone_data["data"])
|
||||
|
||||
logger.debug("Context: %s", context)
|
||||
|
||||
predictions: List[dict] = []
|
||||
|
|
Loading…
Reference in a new issue