Coder Social home page Coder Social logo

How to disable spam? about nsfw_model HOT 7 OPEN

ShamHyper avatar ShamHyper commented on June 10, 2024
How to disable spam?

from nsfw_model.

Comments (7)

colindean avatar colindean commented on June 10, 2024 2

According to this SO post, you should be able to pass verbose=0 in the args to model.predict(), which this library passes via the predict_args arg of classify(), e.g.

predict.classify(classify(model, input_paths, predict_args={verbose: 0})

If that works for you, please confirm and close this issue!

from nsfw_model.

ShamHyper avatar ShamHyper commented on June 10, 2024

Uh...
TypeError: classify() got an unexpected keyword argument 'predict_args'

My code:
result = predict.classify(model_nsfw, file_path, predict_args={verbose: 0})
And "verbose" is not defined.

from nsfw_model.

ShamHyper avatar ShamHyper commented on June 10, 2024

Idk... but after reading code of predict.py, I don't understand how these arguments are passed to keras, and why in your example, after predict.classify, there is another classify in parentheses

According to this SO post, you should be able to pass verbose=0 in the args to model.predict(), which this library passes via the predict_args arg of classify(), e.g.

predict.classify(classify(model, input_paths, predict_args={verbose: 0})

If that works for you, please confirm and close this issue!

It seems that the classify() function does not accept a predict_args parameter ๐Ÿ˜ฃ

from nsfw_model.

colindean avatar colindean commented on June 10, 2024

why in your example, after predict.classify, there is another classify in parentheses

Probably a copy paste error. Take out the second function call

from nsfw_model.

ShamHyper avatar ShamHyper commented on June 10, 2024

predict.classify(model_nsfw, file_path, predict_args={verbose: 0})

This right?

from nsfw_model.

colindean avatar colindean commented on June 10, 2024

Looks to be, I can't try it right now

from nsfw_model.

ShamHyper avatar ShamHyper commented on June 10, 2024

Waiting for dev's answer..

from nsfw_model.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.