UBS-Server / routes /square.py
m-abdur2024's picture
Upload 40 files
0d3476b verified
raw
history blame
437 Bytes
import json
import logging
from flask import request
from routes import app
logger = logging.getLogger(__name__)
@app.route('/square', methods=['POST'])
def evaluate():
data = request.get_json()
logging.info("data sent for evaluation {}".format(data))
input_value = data.get("input")
result = input_value * input_value
logging.info("My result :{}".format(result))
return json.dumps(result)