After required installation, I make a script i.e test.py and write this following code.
from tokenize import tokenize
translator = ctranslate2.Translator("ende_ctranslate2/")
results = translator.translate_batch(
Input = "This project is geared towards efficient serving of standard translation models but is also a place for experimentation around model compression and inference acceleration."
for hypothesis in results:
Unfortunately, I am getting this follwing error:
[tokenize(Input)], TypeError: ‘str’ object is not collable
I am trying to run decoding (Alternatives at a position)
Could please tell me where I am doing mistake or how I can get rid of this error.