moahmedwafy commited on
Commit
6095567
1 Parent(s): 9c820fb

update: responses

Browse files
Files changed (1) hide show
  1. server.py +4 -2
server.py CHANGED
@@ -40,7 +40,8 @@ def fitness_predict():
40
  return jsonify({"error": f"{paramName} is missing"}), 400
41
  params[paramName] = value
42
 
43
- return jsonify({"result": fitness_model.predict(**params)})
 
44
 
45
 
46
  @app.post("/nutrition")
@@ -53,7 +54,8 @@ def nutrition_predict():
53
  if value is None:
54
  return jsonify({"error": f"{paramName} is missing"}), 400
55
  params[paramName] = value
56
- return jsonify({"result": nutrition_model.generate_plan(**params)})
 
57
 
58
 
59
  if __name__ == "__main__":
 
40
  return jsonify({"error": f"{paramName} is missing"}), 400
41
  params[paramName] = value
42
 
43
+ res = fitness_model.predict(**params)
44
+ return jsonify(res)
45
 
46
 
47
  @app.post("/nutrition")
 
54
  if value is None:
55
  return jsonify({"error": f"{paramName} is missing"}), 400
56
  params[paramName] = value
57
+
58
+ return jsonify(nutrition_model.generate_plan(**params))
59
 
60
 
61
  if __name__ == "__main__":