This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests as r | |
import json | |
from pprint import pprint | |
# Images | |
dir = 'https://github.com/ultralytics/yolov5/raw/master/data/images/' | |
imgs = [dir + f for f in ('zidane.jpg', 'bus.jpg')] # batched list of images | |
# Send images to endpoint | |
res = r.post("http://localhost:9999/inference", data=json.dumps({'img_list': imgs})) |