Simba commited on
Commit
568445c
1 Parent(s): 81f2388
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -66,6 +66,12 @@ def respond(image: np.ndarray, prompt: str, chat_history=None):
66
  # This is where you'd use the AI's analysis of the image to tailor the challenge
67
  # For simplicity, the details are hard-coded here
68
  image_details = "A Person Wearing glasses" # Placeholder for actual analysis
 
 
 
 
 
 
69
  challenge = generate_liveness_challenge(image_details)
70
  response = f"For liveness verification, {challenge}"
71
  else:
@@ -78,8 +84,6 @@ def respond(image: np.ndarray, prompt: str, chat_history=None):
78
  return "", chat_history
79
 
80
 
81
-
82
-
83
  with gr.Blocks() as demo:
84
  gr.Markdown(MARKDOWN)
85
  with gr.Row():
 
66
  # This is where you'd use the AI's analysis of the image to tailor the challenge
67
  # For simplicity, the details are hard-coded here
68
  image_details = "A Person Wearing glasses" # Placeholder for actual analysis
69
+
70
+ # Get the image details from the AI model
71
+ ai_response = connector.simple_prompt(image=image, prompt="What details can you describe from this image?")
72
+
73
+ print(ai_response)
74
+
75
  challenge = generate_liveness_challenge(image_details)
76
  response = f"For liveness verification, {challenge}"
77
  else:
 
84
  return "", chat_history
85
 
86
 
 
 
87
  with gr.Blocks() as demo:
88
  gr.Markdown(MARKDOWN)
89
  with gr.Row():