Views
No views yet
inference.py, this is a copied code from original codebase.from inferencer import Inferencer
inferencer = Inferencer(
"/model/AlignScore-large-hf/", # <-- Path to the model
device="cuda:0", # Use "cpu" if you don't have a GPU
)
inferencer.nlg_eval_mode = "nli_sp" # Set the evaluation mode
score = inferencer.score(["hello world."], ["hello world."])
print(score) # Output the score