Anonymous460 commited on
Commit
e2325f6
·
verified ·
1 Parent(s): d943bfc

Update app.py

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