sb-ai-lab / ESGify

ESGify is a model for multilabel news classification with respect to ESG risks.
https://huggingface.co/ai-lab/ESGify
Apache License 2.0
30 stars 2 forks source link

NP in the last section #2

Closed starnekit closed 6 months ago

starnekit commented 8 months ago

Hi! I have an idea to add import numpy as np at the beginning of the code, because without it the final piece of code for i in torch.topk(results, k=3).indices.tolist()[0]: print(f"{model.id2label[i]}: {np.round(results.flatten()[i].item(), 3)}") does not work and it may not be obvious to all users.

kazakov15 commented 6 months ago

@starnekit Thank you