UltralyticsAssistant 2 months ago
parent 71028b5bcd
commit 6b3dc62f32
  1. 5
      ultralytics/solutions/serve.py

@ -14,6 +14,7 @@ from ultralytics.engine.results import Results
class UltralyticsRequest(BaseModel):
image: str
class UltralyticsResponse(BaseModel):
status: str = "success"
results: List[List[Dict]]
@ -24,7 +25,7 @@ class YOLOServe(ls.LitAPI):
"""
Litserve API for YOLO model:
Call order is:
setup -> batch -> decode_request -> predict -> unbatch -> encode_response
setup -> batch -> decode_request -> predict -> unbatch -> encode_response.
Args:
model (str): Model name to use
@ -56,8 +57,6 @@ class YOLOServe(ls.LitAPI):
return UltralyticsResponse(results=[r.to_dict() for r in result])
def run(args):
if "model" in args:
model = args["model"]

Loading…
Cancel
Save