File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
patterns/pattern-1/src/processresults_function Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -871,12 +871,15 @@ def process_segments(
871871 bp_confidence = custom_output ["matched_blueprint" ]["confidence" ]
872872
873873 # Check if any key-value or blueprint confidence is below threshold
874- low_confidence = (any (
875- kv ['confidence' ] < confidence_threshold
876- for page_num in page_indices
877- for kv in pagespecific_details ['key_value_details' ].get (str (page_num ), [])
878- ) or float (bp_confidence ) < confidence_threshold ) and enable_hitl == 'true'
874+ if enable_hitl :
879875
876+ low_confidence = any (
877+ kv ['confidence' ] < confidence_threshold
878+ for page_num in page_indices
879+ for kv in pagespecific_details ['key_value_details' ].get (str (page_num ), [])
880+ ) or float (bp_confidence ) < confidence_threshold
881+ else :
882+ low_confidence = 'false'
880883 logger .info (f"HITL STatus Low confidence { low_confidence } " )
881884
882885 item .update ({
You can’t perform that action at this time.
0 commit comments