This commit includes major additions and updates to the frontend and backend architectures, introducing new dataset management, live counting features, batch processing, and triage logic. Includes new UI pages, components, and API routes.
22 lines
605 B
Python
22 lines
605 B
Python
import json
|
|
from urllib import request, error
|
|
|
|
data = json.dumps({
|
|
"frame_id": 1,
|
|
"engine": "base_model",
|
|
"threshold": 0.35,
|
|
"iou_threshold": 0.8,
|
|
"min_box_frac": 0.0,
|
|
"target_class_names": []
|
|
}).encode('utf-8')
|
|
|
|
req = request.Request('http://127.0.0.1:8000/api/batches/1/preview', data=data, headers={'Content-Type': 'application/json'})
|
|
try:
|
|
with request.urlopen(req) as response:
|
|
print(response.read().decode('utf-8'))
|
|
except error.HTTPError as e:
|
|
print(f"HTTPError: {e.code}")
|
|
print(e.read().decode('utf-8'))
|
|
except Exception as e:
|
|
print(f"Error: {e}")
|