File size: 305 Bytes
5fa1a76
 
 
 
 
 
 
1
2
3
4
5
6
7
The 🤗 Evaluate library provides a simple accuracy function you can load with the [evaluate.load] (see this quicktour for more information) function:

import numpy as np
import evaluate
metric = evaluate.load("accuracy")

Call [~evaluate.compute] on metric to calculate the accuracy of your predictions.