Skip to content

Created a template to deploy ML model with Flask to Heroku to make deployment easy to the front end

License

Notifications You must be signed in to change notification settings

junchernwu/pipelineFlask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploy ML model with Flask to Heroku

Click the button below to quickly clone and deploy into your own Heroku acount. If you don't have one it'll prompt you to setup a free one.

Deploy

Once deployed to your Heroku instance run the following:

curl -s -XPOST 'https://<name-of-your-heroku-app>.herokuapp.com/' -d '{"Pclass":3,"Age":2,"SibSp":1,"Fare":50}' -H 'accept-content: application/json'

Alternatively a simple python script:

import requests
import json
url = 'https://<name-of-your-heroku-app>.herokuapp.com/'
data = {"Pclass":3, "Age":2, "SibSp":1, "Fare":50}
response = requests.post(url, json.dumps(data))
print(response.json())

About

Created a template to deploy ML model with Flask to Heroku to make deployment easy to the front end

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published