Upload occ-use.py
Browse files123456789import websocketsfrom transformers import pipelineextractor = pipeline("text2text-generation", model="occ")intent ="I need a lawn mower for my garden"label=extractor(intent)[0]["generated_text"]if label=="": label="No occupation detected"print (label ) occ-use.pyAdded+9