vicliv commited on
Commit
e8d60f5
·
1 Parent(s): cde6e53

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -126,7 +126,7 @@ def detect_with_model(image: Image.Image, prompt: str, username: str, model_name
126
  return "Please enter your name.", None, [], gr.update(visible=True), gr.update(visible=False), username
127
 
128
  prompt_score = compute_prompt_match(image, prompt)
129
- if prompt_score < PROMPT_MATCH_THRESHOLD and model.lower() != "real":
130
  message = f"⚠️ Prompt match too low ({round(prompt_score, 2)}%). Please generate an image that better matches the prompt."
131
  return message, None, leaderboard, gr.update(visible=True), gr.update(visible=False), username
132
 
 
126
  return "Please enter your name.", None, [], gr.update(visible=True), gr.update(visible=False), username
127
 
128
  prompt_score = compute_prompt_match(image, prompt)
129
+ if prompt_score < PROMPT_MATCH_THRESHOLD and model_name.lower() != "real":
130
  message = f"⚠️ Prompt match too low ({round(prompt_score, 2)}%). Please generate an image that better matches the prompt."
131
  return message, None, leaderboard, gr.update(visible=True), gr.update(visible=False), username
132