Python, Data Science, AI, NLP, Programming.
return_tensors="pt") # Make the prediction outputs = model(**inputs) scores = outputs.logits.detach().numpy()[0] scores = softmax(scores) # Print the results labels = ["Negative", "Positive"] ranking = np.argsort(scores) ranking = ranking[::-1] for i in range(scores.shape[0]): l =