You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
There are some mistakes in your code samples in the README.
There is a mistake in the line of the REBEL example code below:
extracted_text = triplet_extractor.tokenizer.batch_decode(triplet_extractor("Punta Cana is a resort town in the municipality of Higuey, in La Altagracia Province, the eastern most province of the Dominican Republic", return_tensors=True, return_text=False)[0]["generated_token_ids"]["output_ids"])
The code line below gives : TypeError: 'list' object cannot be interpreted as an integer:
It should be like :
extracted_text = triplet_extractor.tokenizer.batch_decode(triplet_extractor("Punta Cana is a resort town in the municipality of Higuey, in La Altagracia Province, the eastern most province of the Dominican Republic", return_tensors=True, return_text=False)[0]["generated_token_ids"]["output_ids"][0])
The second mistake is in the spaCy example:
The line below gives the TypeError: add_pipe() got an unexpected keyword argument 'config'
nlp.add_pipe("rebel", after="senter", config={
'device':0, # Number of the GPU, -1 if want to use CPU
'model_name':'Babelscape/rebel-large'} # Model used, will default to 'Babelscape/rebel-large' if not given
)
Could you correct your samples in the Readme?
Thanks in advance.
Bests,
The text was updated successfully, but these errors were encountered:
Hi @sefeoglu thanks for bringing these two issues.
The first one has to do with a change on the transformers library, there is some inconsistency between the version in the requirements with the actual version of the library. I will try to update the requirements to a more recent transformers version and make sure that the code on the readme/repo works with it.
Regarding the second problem, I believe it comes from your end. Do you have an updated version of spaCy? I have no issues running the spaCy script with the latest version. Perhaps you can give me a bit more info in which version you are using.
Hello,
There are some mistakes in your code samples in the README.
The code line below gives : TypeError: 'list' object cannot be interpreted as an integer:
It should be like :
The line below gives the TypeError: add_pipe() got an unexpected keyword argument 'config'
Could you correct your samples in the Readme?
Thanks in advance.
Bests,
The text was updated successfully, but these errors were encountered: