Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

example_request.py 299 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
  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)
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...