File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -395,6 +395,7 @@ def active_learning(
395
395
upload_destination : str = "" ,
396
396
conditionals : dict = {},
397
397
use_localhost : bool = False ,
398
+ local_server = "http://localhost:9001/" ,
398
399
) -> Any :
399
400
"""perform inference on each image in directory and upload based on conditions
400
401
@params:
@@ -404,6 +405,7 @@ def active_learning(
404
405
upload_destination: (str) = name of the upload project
405
406
conditionals: (dict) = dictionary of upload conditions
406
407
use_localhost: (bool) = determines if local http format used or remote endpoint
408
+ local_server: (str) = local http address for inference server, use_localhost must be True for this to be used
407
409
""" # noqa: E501 // docs
408
410
prediction_results = []
409
411
@@ -431,7 +433,10 @@ def active_learning(
431
433
)
432
434
433
435
# check if inference_model references endpoint or local
434
- local = "http://localhost:9001/" if use_localhost else None
436
+ if use_localhost :
437
+ local = local_server
438
+ else :
439
+ local = None
435
440
436
441
inference_model = (
437
442
self .project (inference_endpoint [0 ]).version (version_number = inference_endpoint [1 ], local = local ).model
You can’t perform that action at this time.
0 commit comments