hassan526 commited on
Commit
faf5061
·
verified ·
1 Parent(s): 9b45870

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -118,7 +118,9 @@ def check_liveness(frame):
118
  if screenReply < screenReplayThreshold or portraitReplace < portraitReplaceThreshold or printedCopy < printedCopyThreshold:
119
  liveness_result = f"""<div class="markdown-fail-container"><p style="text-align: center; font-size: 20px; color: red;">Liveness Check: SPOOF</p></div>"""
120
 
121
- json_output = {"status": "ok", "data": {"screenreplay_integrity_score": screenReply, "portraitreplace_integrity_score": portraitReplace, "printedcutout_integrity_score": printedCopy}}
 
 
122
  # Update json_result with the modified process_results
123
  return [liveness_result, json_output]
124
 
 
118
  if screenReply < screenReplayThreshold or portraitReplace < portraitReplaceThreshold or printedCopy < printedCopyThreshold:
119
  liveness_result = f"""<div class="markdown-fail-container"><p style="text-align: center; font-size: 20px; color: red;">Liveness Check: SPOOF</p></div>"""
120
 
121
+ json_output = {"Screen Replay Check": "Failed" if screenReply < screenReplayThreshold else "Success",
122
+ "Portrait Replace Check": "Failed" if portraitReplace < portraitReplaceThreshold else "Success",
123
+ "Printed Cutout Check": "Failed" if printedCopy < printedCopyThreshold else "Success"}
124
  # Update json_result with the modified process_results
125
  return [liveness_result, json_output]
126