calibrate
This commit is contained in:
@@ -32,6 +32,14 @@ def post_verify(client, probe: bytes, references: list[tuple[str, bytes, str]],
|
||||
)
|
||||
|
||||
|
||||
def post_calibrate(client, positives: list[tuple[str, bytes, str]],
|
||||
negatives: list[tuple[str, bytes, str]]):
|
||||
"""Пачки калибровки — списки (имя, байты, content_type)."""
|
||||
files = [("positive", p) for p in positives]
|
||||
files += [("negative", n) for n in negatives]
|
||||
return client.post("/api/v1/calibrate", headers=API_KEY_HEADERS, files=files)
|
||||
|
||||
|
||||
def make_blob_ref(blob: bytes) -> tuple[str, bytes, str]:
|
||||
return ("reference.npz", blob, "application/octet-stream")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user