File size: 763 Bytes
81da23f
 
 
 
 
 
 
0fa15cb
81da23f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
license: apache-2.0
---
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.

**How to use:**

```python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

model_path = 'voxreality/t5_nlu_intent_recognition'

tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForSeq2SeqLM.from_pretrained(model_path)

input_text = "Where is the conference room?"

input_tokenized = tokenizer.encode(input_text, return_tensors='pt')
output = model.generate(input_tokenized, max_new_tokens=100).tolist()
nlu_output_str = tokenizer.decode(output[0], skip_special_tokens=True)

print(nlu_output_str)
```