multimodalart HF staff commited on
Commit
0dc6679
1 Parent(s): 4eff749

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -32,7 +32,7 @@ def check_nsfw(json_data, profile):
32
  return True
33
  for model_version in json_data["modelVersions"]:
34
  for image in model_version["images"]:
35
- if image["nsfw"] > 2:
36
  return False
37
  return True
38
 
@@ -65,7 +65,7 @@ def extract_info(json_data):
65
  for image in model_version["images"]:
66
  image_id = image["url"].split("/")[-1].split(".")[0]
67
  prompt, negative_prompt = get_prompts_from_image(image_id)
68
- if image["nsfwLevel"] > 2:
69
  pass #ugly before checking the actual logic
70
  else:
71
  urls_to_download.append({
 
32
  return True
33
  for model_version in json_data["modelVersions"]:
34
  for image in model_version["images"]:
35
+ if image["nsfw"] > 5:
36
  return False
37
  return True
38
 
 
65
  for image in model_version["images"]:
66
  image_id = image["url"].split("/")[-1].split(".")[0]
67
  prompt, negative_prompt = get_prompts_from_image(image_id)
68
+ if image["nsfwLevel"] > 5:
69
  pass #ugly before checking the actual logic
70
  else:
71
  urls_to_download.append({