Skip to main content

Predicts whether a sentence is a visual sentence or a contextual sentence

Project description

Visual Contextual Classifier

Install

To install the library run this command

pip install visual-contextual-classifier

Usage

from VisualContextualClassifier import VisualContextualClassifier
# Instantiate the object (will download model files on the first creation)
classifier=VisualContextualClassifier()
classifier.predict("The sentence you want to classify")

Explanation

Artwork descriptions typically have two types of sentences, visual & contextual. A visual sentence will contain words and phrases that relate to or explain the visual content of the artwork. A contextual sentence will talk about the artpiece such as the artist, the time period, or the inspirations behind the work.

Visual

classifier.predict("A vast river is laid out with a deep blue hue")
{'contextual': 0.005291305482387543, 'visual': 0.9947086572647095}

Contextual

classifier.predict("This was the last artpiece the artist ever produced, he died 14 days after finishing this piece")
{'contextual': 0.9987691044807434, 'visual': 0.0012308646691963077}

Project details


Download files

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

Source Distribution

visual_contextual_classifier-1.2.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

visual_contextual_classifier-1.2-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file visual_contextual_classifier-1.2.tar.gz.

File metadata

File hashes

Hashes for visual_contextual_classifier-1.2.tar.gz
Algorithm Hash digest
SHA256 ccc6bbcdfd1525a42dcec2b7f29183e788ad2c620aaf9954935ef67455aab308
MD5 a94f02df70ca88f58971114b071d8edf
BLAKE2b-256 08774886bc1771d0ffcd3b32b771aa85419e59dd15999cffde14642658eb0d20

See more details on using hashes here.

File details

Details for the file visual_contextual_classifier-1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for visual_contextual_classifier-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 72b060a488cff109c5f9b03a4f2c15f8e64166011bff3bb39685c06743649902
MD5 95094f528e43ef19e498896fc76fb5ac
BLAKE2b-256 70b63d06f7be72f27aead31ea5cc77fa0e8e8a0bed5a529c65a82f69e3e6b842

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page