thefcraft / nsfw-prompt-detection-sd

NSFW Prompt Detection for Stable Diffusion
24 stars 1 forks source link

Keras module deprecated #4

Open Fairweather13024 opened 2 months ago

Fairweather13024 commented 2 months ago

Great work on this project and making the internet a safer place! However, consider publishing your requirements.txt or updating the libraries that are used

I get this issue which relates to this stack overflow thread which mentions that the module that throws the error is deprecated https://stackoverflow.com/questions/78242571/import-keras-preprocessing-text-could-not-be-resolved:

    with open('nsfw_classifier_tokenizer.pickle', 'rb') as f: tokenizer = pickle.load(f)
ModuleNotFoundError: No module named 'keras.preprocessing.text'

on Python 3.10.6 with only tensorflow in my requirements.txt

thefcraft commented 2 months ago

try with tensorflow 2.10.1