Instructions to use voxreality/t5_nlu_intent_recognition with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use voxreality/t5_nlu_intent_recognition with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("voxreality/t5_nlu_intent_recognition") model = AutoModelForSeq2SeqLM.from_pretrained("voxreality/t5_nlu_intent_recognition", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
---
|
| 4 |
+
A fine-tuned version of the T5 model for intent recognition. It is adept at discerning user queries, and categorizing them into requests for navigation, program details, or trade show information.
|
| 5 |
+
|
| 6 |
+
**How to use:**
|
| 7 |
+
|
| 8 |
+
```
|
| 9 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
| 10 |
+
|
| 11 |
+
model_path = 'voxreality/t5_nlu_intent_recognition'
|
| 12 |
+
|
| 13 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
| 14 |
+
model = AutoModelForSeq2SeqLM.from_pretrained(model_path)
|
| 15 |
+
|
| 16 |
+
input_text = "Where is the conference room?"
|
| 17 |
+
|
| 18 |
+
input_tokenized = tokenizer.encode(input_text, return_tensors='pt')
|
| 19 |
+
output = model.generate(input_tokenized, max_new_tokens=100).tolist()
|
| 20 |
+
nlu_output_str = tokenizer.decode(output[0], skip_special_tokens=True)
|
| 21 |
+
|
| 22 |
+
print(nlu_output_str)
|
| 23 |
+
```
|