Spaces:
Running
Running
The example code will result into error
#2
by
raptorkwok
- opened
Here is the example code in the Space:
import evaluate
metric_nist = evaluate.load('nist_mt')
hypothesis1 = "It is a guide to action which ensures that the military always obeys the commands of the party"
reference1 = "It is a guide to action that ensures that the military will forever heed Party commands"
reference2 = "It is the guiding principle which guarantees the military forces always being under the command of the Party"
print(metric_nist.compute(hypothesis1, [reference1, reference2]))
It will result in the following error:
TypeError: compute() takes 1 positional argument but 3 were given
How to resolve this? Thanks.
metric_nist.compute(predictions=hypos, references=refs)