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
model_name=r'batterydata/batterybert-cased'tokenizer=BertTokenizer.from_pretrained(model_name)
model=BertModel.from_pretrained(model_name, output_attentions=True)
frombatterycode.appsimportDeviceDataExtractorextractor=DeviceDataExtractor(model)
sample_text="The anode of this Li-ion battery is graphite."result=extractor.extract(sample_text, threshold=0.1)
the result is
AttributeError: 'BertModel' object has no attribute 'model_max_length'
I tried different versions of transformers, but it shows the same results.
Could you tell me what version you use?
Thanks.
The text was updated successfully, but these errors were encountered:
Hi, when I run
the result is
I tried different versions of
transformers
, but it shows the same results.Could you tell me what version you use?
Thanks.
The text was updated successfully, but these errors were encountered: