We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fca4310 commit 4a10e33Copy full SHA for 4a10e33
run_wsgi.py
@@ -10,7 +10,7 @@ class InfDetectBody(BaseModel):
10
model_id: str
11
data: List[str]
12
src_type: str = "url"
13
- task: Union[str, List] # {key: embedding, ....}
+ task: str
14
labels: List[str]
15
threshold: float = 0.1
16
nms_threshold: float = 0.5
@@ -57,9 +57,9 @@ async def detect_urls(
57
nms_threshold=body.nms_threshold,
58
)
59
60
- resp = DetectionRes(took=(time.time() - s_time) * 1000, objects=out)
+ resp = DetectionRes(took=int((time.time() - s_time) * 1000), objects=out)
61
return resp
62
63
64
if __name__ == "__main__":
65
- uvicorn.run("wsgi:app", host="0.0.0.0", port=8000)
+ uvicorn.run("run_wsgi:app", host="0.0.0.0", port=8000)
0 commit comments