mirror of
https://github.com/brycedrennan/imaginAIry
synced 2024-11-05 12:00:15 +00:00
eaad0a15e4
- fix bugs - disable some tests from running in CPU only mode since github actions can't handle it
14 lines
299 B
Python
14 lines
299 B
Python
from PIL import Image
|
|
|
|
from imaginairy.safety import is_nsfw
|
|
from tests import TESTS_FOLDER
|
|
|
|
|
|
def test_is_nsfw():
|
|
img = Image.open(f"{TESTS_FOLDER}/data/safety.jpg")
|
|
|
|
assert is_nsfw(img)
|
|
|
|
img = Image.open(f"{TESTS_FOLDER}/data/girl_with_a_pearl_earring.jpg")
|
|
assert not is_nsfw(img)
|