Transformers
TensorBoard
Safetensors
t5
text2text-generation
Generated from Trainer
text-generation-inference
Instructions to use datasetsANDmodels/occupation-extraction with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use datasetsANDmodels/occupation-extraction with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("datasetsANDmodels/occupation-extraction") model = AutoModelForSeq2SeqLM.from_pretrained("datasetsANDmodels/occupation-extraction", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download usage.py from datasetsANDmodels/occupation-extraction: direct link, hf CLI and curl.
- Browser
- Download file 315 Bytes
-
https://huggingface.co/datasetsANDmodels/occupation-extraction/resolve/main/usage.py
- Command line
-
hf download hf://datasetsANDmodels/occupation-extraction/usage.py
-
curl -L -o usage.py https://huggingface.co/datasetsANDmodels/occupation-extraction/resolve/main/usage.py
315 Bytes
| import websockets | |
| from transformers import pipeline | |
| extractor = pipeline("text2text-generation", model="datasetsANDmodels/occupation-extraction") | |
| intent ="I need a lawn mower for my garden" | |
| label=extractor(intent)[0]["generated_text"] | |
| if label=="": | |
| label="No occupation detected" | |
| print (label ) | |