pinecone-io / examples

Jupyter Notebooks to help you get hands-on with Pinecone vector databases
MIT License
2.73k stars 1.02k forks source link

Sentiment Analysis with Pinecone example - Hugging Face model out of date #383

Open Beloved6883 opened 1 month ago

Beloved6883 commented 1 month ago

To whom this may concern,

Thank you for the work to make these examples available. I was working through the Sentiment Analysis with Pinecone Google Colab notebook and found that the model_id for the RoBERTa model is out of date. Here's the latest model: cardiffnlp/twitter-roberta-base-sentiment-latest.

Thanks!

Natasha

Beloved6883 commented 1 month ago

Another issue that results from this updated model is that the labels are no longer: LABEL_0 for negative, LABEL_1 for neutral, and LABEL_2 for positive. They are just "negative", "neutral", and "positive." Therefore, the labels dictionary is probably unnecessary and could be converted to a list. Then, the get_sentiment() function should also be updated to reflect this.