machine-learning-deployment icon indicating copy to clipboard operation
machine-learning-deployment copied to clipboard

Not an Issue! Just a question

Open abhiksngh opened this issue 5 years ago • 2 comments

In your Flask app.py, when does this get called, I tried removing this part of the code but it still runs, I am sorry if its a naive question, I am very new to flask:

@app.route('/results',methods=['POST'])

def results():

     data = request.get_json(force=True)
     prediction = model.predict([np.array(list(data.values()))])

     output = prediction[0]
     return jsonify(output)

abhiksngh avatar Nov 12 '19 21:11 abhiksngh

'/predict' and '/results' are services that do different things. The predict, retrieves data from the html page and shows the result on it, while 'results' basically retrieves data from the python file requests.py . If you launch the app (running in the terminal python3 app.py) and on a different terminal you run the command python3 requests.py you will see the result.

So, if you just use the webpage to feed data to the app, then you can just delete this part of the code.

leschiffres avatar Jan 24 '20 10:01 leschiffres

hello, I have a question ,can we deploy pretrained gan model on flask.model is about face attribute manipulation. If not can anyone suggest other way to deploy the model?

shbnm21 avatar Aug 15 '20 09:08 shbnm21