Upload handler.py
Browse files12348 unmodified lines1314151516171819202122from typing import Dict, List, Anyimport supervision as svimport urllib.requestimport numpy as np8 unmodified lines api_key=key ) def __call__(self, path , isurl): def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]: inputs = data.get("inputs") isurl = inputs.get("isurl") path = inputs.get("path")########################### Load Image ################################# if(isurl): # for url set isurl = 1 req = urllib.request.urlopen(path)handler.py+5-1