Skip to content

Instantly share code, notes, and snippets.

@moezali1
Created April 23, 2021 21:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moezali1/545be5743b61aa5477228b8727e40b59 to your computer and use it in GitHub Desktop.
Save moezali1/545be5743b61aa5477228b8727e40b59 to your computer and use it in GitHub Desktop.
import requests
def get_predictions(carat_weight, cut, color, clarity, polish, symmetry, report):
url = 'http://localhost:8000/predict?carat_weight={carat_weight}&cut={cut}&color={color}&clarity={clarity}&polish={polish}&symmetry={symmetry}&report={report}'\
.format(carat_weight = carat_weight, cut = cut,\
color = color, clarity = clarity, polish = polish, symmetry = symmetry, report = report)
x = requests.post(url)
print(x.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment