apoman's picture
Update README.md
0fa15cb verified
|
raw
history blame
763 Bytes
metadata
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:

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)