Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

This is a module to predict the products category using artificial inteligence.

Project description

NK Artificial Intelligence

Welcome to NKIA or NKAI in English. This project is used to categorize products based on its caracteristics, there is 29 different classes of food products. Another usage is to distinguish between food and non-food products.

Requirements

  • Install requirements:

    • pip install -r requirements.txt --user
  • Install NLTK stopwords:

    • python -m nltk.downloader stopwords

Usage

  • Import classify class:
    • from nkia.ml.classify_products import ClassifyProducts as cp
  • Predict product class:
    • cp().inference_from_category_model(product_name=['frozen fish'])
    • Returns: String containing the predicted class name
  • Parameters:
    • inference_from_category_model(ingredients=[''], allergics=[''], description=[''], product_name=[''])
    • All the parameters must be in a single string format.
  • Predict if product is a food or not:
    • cp().inference_from_food_model(product_name=['chocolate cake'])
    • Returns: String 'food' or 'not food'
    • Note: Food classifier just has the product name as parameter.

Examples

  • cp().inference_from_category_model(ingredients=['sugar salt vanilla orange'], allergics=['peanuts'], description=['this is an awesome product, hummmm'], product_name=['very delicious candy'])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for nkia, version 1.9.1
Filename, size File type Python version Upload date Hashes
Filename, size nkia-1.9.1-py3-none-any.whl (9.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size nkia-1.9.1.tar.gz (42.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page