Product Classifier

Given a set of sample products, identify if it is a type of power tool, screw, or cement board

Classify Data
Topic Classification

Examples

LABEL

TEXT

Power tools

20V MAX ATOMIC Lithium-Ion Cordless Brushless 5/8-inch SDS Plus Rotary Hammer

Power tools

18V Lithium-Ion Cordless Hammer Drill Kit with 1.5 Ah Battery and Charger

Power tools

15-amp Corded 12-inch Double-Bevel Sliding Compound Miter Saw

Power tools

15 Amp 12 -Inch Sliding Compound Mitre Saw

Power tools

M18 18V Lithium-Ion Cordless SAWZALL Reciprocating Saw

Cement boards

1/2 in. x 4 ft. x 8 ft. UltraLight Mold Tough Drywall Panel

Cement boards

Cement Board with EdgeGuard 1/2 in. x 4 ft. x 8 ft.

Cement boards

Wall Repair Patch Kit with Drydex Spackling

Cement boards

Dust Control Drywall Compound, Ready-Mixed, 12 L Pail

Cement boards

EZ Grid Cement Board 3 ft. x 5 ft. X 1/4 inch

Cement boards

Machine Mud Drywall Compound, Ready-Mixed, 17 L Carton

Screws

#6 x 1-1/4-inch Flat Head Phillips Drive Coarse Thread Drywall Screws - 1000pcs

Screws

3/8-inch x 4-inch Pro Pack Black Carriage Bolts (5 Sets)

Screws

M8-1.25 x 20mm Class 8.8 Metric Hex Cap Screw - DIN 933 Full Thread - Zinc Plated

Screws

18-Gauge 2-inch Brad Nails (1000 per Box)

Screws

120 X 3-1/4" Pro-Strip Nail Smooth Shank (3,000 - Pack)

Request

1,200-Piece 8 x 2-1/2-inch Brown Deck Screws

Response

Screws

100%

Cement boards

0%

Power tools

0%

API Request
import cohere
from cohere.classify import Example
co = cohere.Client('{apiKey}')
response = co.classify(
model='large',
inputs=["1,200-Piece 8 x 2-1/2-inch Brown Deck Screws"],
examples=[Example("20V MAX ATOMIC Lithium-Ion Cordless Brushless 5/8-inch SDS Plus Rotary Hammer", "Power tools"), Example("18V Lithium-Ion Cordless Hammer Drill Kit with 1.5 Ah Battery and Charger", "Power tools"), Example("15-amp Corded 12-inch Double-Bevel Sliding Compound Miter Saw", "Power tools"), Example("15 Amp 12 -Inch Sliding Compound Mitre Saw", "Power tools"), Example("M18 18V Lithium-Ion Cordless SAWZALL Reciprocating Saw", "Power tools"), Example("1/2 in. x 4 ft. x 8 ft. UltraLight Mold Tough Drywall Panel", "Cement boards"), Example("Cement Board with EdgeGuard 1/2 in. x 4 ft. x 8 ft.", "Cement boards"), Example("Wall Repair Patch Kit with Drydex Spackling", "Cement boards"), Example("Dust Control Drywall Compound, Ready-Mixed, 12 L Pail", "Cement boards"), Example("EZ Grid Cement Board 3 ft. x 5 ft. X 1/4 inch", "Cement boards"), Example("Machine Mud Drywall Compound, Ready-Mixed, 17 L Carton", "Cement boards"), Example("#6 x 1-1/4-inch Flat Head Phillips Drive Coarse Thread Drywall Screws - 1000pcs", "Screws"), Example("3/8-inch x 4-inch Pro Pack Black Carriage Bolts (5 Sets)", "Screws"), Example("M8-1.25 x 20mm Class 8.8 Metric Hex Cap Screw - DIN 933 Full Thread - Zinc Plated", "Screws"), Example("18-Gauge 2-inch Brad Nails (1000 per Box)", "Screws"), Example("120 X 3-1/4\" Pro-Strip Nail Smooth Shank (3,000 - Pack)", "Screws")])
print('The confidence levels of the labels are: {}'.format(response.classifications))