hassan526 commited on
Commit
8af1614
·
verified ·
1 Parent(s): c1fe4a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -218,7 +218,8 @@ def check_liveness(frame):
218
  global g_id_live_activation_result
219
  if g_id_live_activation_result != 0:
220
  gr.Warning("ID LIVE SDK Activation Failed!")
221
- return {"status": "error", "result": "activation error!", None}
 
222
  try:
223
  image = Image.open(frame)
224
  image = apply_exif_rotation(image.convert('RGB'))
 
218
  global g_id_live_activation_result
219
  if g_id_live_activation_result != 0:
220
  gr.Warning("ID LIVE SDK Activation Failed!")
221
+ raise gr.Error("Activation error!")
222
+
223
  try:
224
  image = Image.open(frame)
225
  image = apply_exif_rotation(image.convert('RGB'))