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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file visual_contextual_classifier-1.2.tar.gz.
File metadata
- Download URL: visual_contextual_classifier-1.2.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccc6bbcdfd1525a42dcec2b7f29183e788ad2c620aaf9954935ef67455aab308
|
|
| MD5 |
a94f02df70ca88f58971114b071d8edf
|
|
| BLAKE2b-256 |
08774886bc1771d0ffcd3b32b771aa85419e59dd15999cffde14642658eb0d20
|
File details
Details for the file visual_contextual_classifier-1.2-py3-none-any.whl.
File metadata
- Download URL: visual_contextual_classifier-1.2-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72b060a488cff109c5f9b03a4f2c15f8e64166011bff3bb39685c06743649902
|
|
| MD5 |
95094f528e43ef19e498896fc76fb5ac
|
|
| BLAKE2b-256 |
70b63d06f7be72f27aead31ea5cc77fa0e8e8a0bed5a529c65a82f69e3e6b842
|