You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 line
299B

  1. """Perform test request"""
  2. import pprint
  3. import requests
  4. DETECTION_URL = "http://localhost:5000/v1/object-detection/yolov5s"
  5. TEST_IMAGE = "zidane.jpg"
  6. image_data = open(TEST_IMAGE, "rb").read()
  7. response = requests.post(DETECTION_URL, files={"image": image_data}).json()
  8. pprint.pprint(response)