multimodalart HF staff commited on
Commit
cc9151c
1 Parent(s): b8406cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -32,7 +32,7 @@ def check_nsfw(json_data, profile):
32
  for model_version in json_data["modelVersions"]:
33
  for image in model_version["images"]:
34
  print(image)
35
- if image["nsfw"] not in ["None", "Soft"]:
36
  return False
37
  return True
38
 
@@ -47,8 +47,7 @@ def extract_info(json_data):
47
 
48
  # Then append all image URLs to the list
49
  for image in model_version["images"]:
50
- print(image)
51
- if image["nsfw"] != "None":
52
  pass #ugly before checking the actual logic
53
  else:
54
  urls_to_download.append({
 
32
  for model_version in json_data["modelVersions"]:
33
  for image in model_version["images"]:
34
  print(image)
35
+ if image["nsfw"] > 2:
36
  return False
37
  return True
38
 
 
47
 
48
  # Then append all image URLs to the list
49
  for image in model_version["images"]:
50
+ if image["nsfwLevel"] > 2:
 
51
  pass #ugly before checking the actual logic
52
  else:
53
  urls_to_download.append({