So basically in chapter 8 we have used "from datasets import load_metric" but now in the latest version of the datasets they have removed the load_metric and now you have to use the evaluate module for that.
So replace the mentioned line with:
import evaluate
accuracy_score= evaluate.load('accuracy')