Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
|
@@ -300,7 +300,7 @@ def nsfw_check(item, attempts=1):
|
|
| 300 |
return nsfw_check(item, attempts+1)
|
| 301 |
|
| 302 |
scores = {item['label']: item['score'] for item in json_response}
|
| 303 |
-
error_msg = scores.get('nsfw', 0) > .
|
| 304 |
return error_msg
|
| 305 |
except json.JSONDecodeError as e:
|
| 306 |
print(f'JSON Decoding Error: {e}')
|
|
|
|
| 300 |
return nsfw_check(item, attempts+1)
|
| 301 |
|
| 302 |
scores = {item['label']: item['score'] for item in json_response}
|
| 303 |
+
error_msg = scores.get('nsfw', 0) > .1
|
| 304 |
return error_msg
|
| 305 |
except json.JSONDecodeError as e:
|
| 306 |
print(f'JSON Decoding Error: {e}')
|