Spaces:
Running
Running
Commit
•
cc9151c
1
Parent(s):
b8406cb
Update app.py
Browse files
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"]
|
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 |
-
|
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({
|