Given a set of sample products, identify if it is a type of power tool, screw, or cement board
1,200-Piece 8 x 2-1/2-inch Brown Deck Screws
Value
Confidence level
Screws
100%
1import cohere
2from cohere.classify import Example
3co = cohere.Client('{apiKey}')
4response = co.classify(
5 model='embed-english-v2.0',
6 inputs=["1,200-Piece 8 x 2-1/2-inch Brown Deck Screws"],
7 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")])
8print('The confidence levels of the labels are: {}'.format(response.classifications))