Confirm your email address
Value
Confidence level
Not Spam
76%
1import cohere
2from cohere.classify import Example
3co = cohere.Client('{apiKey}')
4response = co.classify(
5 model='embed-english-v2.0',
6 inputs=["Confirm your email address", "hey i need u to send some $"],
7 examples=[Example("Dermatologists don\'t like her!", "Spam"), Example("Hello, open to this?", "Spam"), Example("I need help please wire me $1000 right now", "Spam"), Example("Hot new investment, don’t miss this!", "Spam"), Example("Nice to know you ;)", "Spam"), Example("Please help me?", "Spam"), Example("Your parcel will be delivered today", "Not spam"), Example("Review changes to our Terms and Conditions", "Not spam"), Example("Weekly sync notes", "Not spam"), Example("Re: Follow up from today’s meeting", "Not spam"), Example("Pre-read for tomorrow", "Not spam")])
8print('The confidence levels of the labels are: {}'.format(response.classifications))