Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #How to infer using Python.
- import json
- import requests
- import base64
- API_LINK = "" #Your API URL goes here
- data_to_send = [] #Data you want to send for prediction goes here
- response = requests.post(
- API_LINK,
- headers={"Content-type": "application/json"},
- data=json.dumps({
- 'input': data_to_send,
- }))
- result = response.json()
- print(result) #Prediction response
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement