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
Describe the bug
Unable to successfully execute predict function for UniversalSentimentAnalysis
example file
pyabsa/tasks/UniversalSentimentAnalysis/trainer/trainer.py
Code To Reproduce
from pyabsa.tasks import UniversalSentimentAnalysis as USA
usa_predictor = USA.USAPredictor(checkpoint="multilingual")
examples = [
'{"text": "keyboard key fragile .", "labels": [{"aspect": "keyboard", "opinion": "fragile", "polarity": "negative", "category": "KEYBOARD#QUALITY"}]}'
]
inference_results = usa_predictor.predict(examples)
print(inference_results)
while True:
text = input("Please input your text: ")
inference_results = usa_predictor.predict(text)
print(inference_results)
Expected behavior usa_predictor.predict(examples) should output predicted labels, but errors out
Screenshots
Error
RuntimeError: Fail to load the model from multilingual! Please make sure the version of checkpoint and PyABSA are compatible. Try to remove he checkpoint and download again
The text was updated successfully, but these errors were encountered:
Version
Name: pyabsa
Version: 2.4.1.post1
Name: torch
Version: 2.3.1
Name: transformers
Version: 4.41.2
Describe the bug
Unable to successfully execute predict function for UniversalSentimentAnalysis
example file
pyabsa/tasks/UniversalSentimentAnalysis/trainer/trainer.py
Code To Reproduce
Expected behavior
usa_predictor.predict(examples)
should output predicted labels, but errors outScreenshots
Error
The text was updated successfully, but these errors were encountered: