Skip to content

Commit

Permalink
Merge pull request #11 from ipranjal/feature/flask
Browse files Browse the repository at this point in the history
adding flask api
  • Loading branch information
ipranjal authored Nov 7, 2023
2 parents 98e047a + fc0eb14 commit d95debd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions api/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from flask import Flask, request, jsonify

app = Flask(__name__)

@app.route('/hello/<name>')
def index(name):
return "Hello, "+name+"!"

@app.route('/model', methods=['POST'])
def pred_model():
js = request.get_json()
x= js['x']
y = js['y']
return x+y

0 comments on commit d95debd

Please sign in to comment.