Spaces:
Runtime error
Runtime error
Chidam Gopal commited on
update
Browse files1234530 unmodified lines36373839404142from transformers import AutoTokenizerimport torchimport onnxruntime as ortimport numpy as npimport requests30 unmodified linesdef find_intent(self, sequence, verbose=False):inputs = self.tokenizer(sequence,return_tensors="pt", # ONNX requires inputs in NumPy formatpadding="max_length", # Pad to max lengthtruncation=True, # Truncate if the text is too longmax_length=64)123430 unmodified lines35363738394041from transformers import AutoTokenizerimport onnxruntime as ortimport numpy as npimport requests30 unmodified linesdef find_intent(self, sequence, verbose=False):inputs = self.tokenizer(sequence,return_tensors="np", # ONNX requires inputs in NumPy formatpadding="max_length", # Pad to max lengthtruncation=True, # Truncate if the text is too longmax_length=64)
infer_intent.py+1-2