Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New version is broken #55

Closed
remusnegrota opened this issue Apr 27, 2020 · 5 comments · Fixed by #58
Closed

New version is broken #55

remusnegrota opened this issue Apr 27, 2020 · 5 comments · Fixed by #58

Comments

@remusnegrota
Copy link

Getting this error:
ImportError: cannot import name 'NSFWDetector' from 'nsfw_detector' (unknown location)

@TechnikEmpire
Copy link
Contributor

Yikes, I might have done this.

@TechnikEmpire
Copy link
Contributor

@remusnegrota Where are you seeing this error? A stack trace + command used would help. I can't even find an import of NSFWDetector, its only defined nsfw_model\tf1\nsfw_detector\__init__.py

@remusnegrota
Copy link
Author

remusnegrota commented Apr 30, 2020

@TechnikEmpire If you simply import the package as before and as it is stated in the Usage readme, like so:
from nsfw_detector import NSFWDetector

then it throws that error directly, no other stack trace
ImportError: cannot import name 'NSFWDetector' from 'nsfw_detector' (unknown location)

Maybe its a documentation issue and the way you need to import the package changed, in that case just update the Usage instructions.

@ezavesky
Copy link

ezavesky commented May 6, 2020

The new version does need a little work to fix the package and documentation, but here's how to run it. Most notably, the simple run directions are out of date.

git clone git@github.com:GantMan/nsfw_model.git
cd nsfw_model/nsfw_detector
(download model from release, unzip model, assume it's in `mobilenet_v2_140_224`)
(download images, place them in `images`)
python predict.py --saved_model_path mobilenet_v2_140_224 --image_dir images

@ezavesky
Copy link

ezavesky commented May 7, 2020

BTW, I will try to push a change for this tonight.

@ezavesky ezavesky mentioned this issue May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants