import requests

API_URL = "https://staircase-detection.herokuapp.com/predict"; 

files = {'file': ("1.png", open('1.png', 'rb'))} 
resp = requests.post(API_URL, files=files) 

data = resp.json()
print(resp.status_code) 
print(data)
print(data['type'])