In this project, I've developed a sophisticated sentiment analysis model tailored specifically to categorize tweets into positive, neutral, or negative sentiments. Understanding the importance of deciphering public opinion and emotional nuances expressed on social media platforms, my model excels in capturing subtle sentiment variations. I've integrated this model into an intuitive Web Application using Gradio, allowing users to easily input tweets and receive instantaneous sentiment analysis results.
Naive Bayes classifies tweets into three sentiment categories based on word frequencies. Then, LLaMA2 7B, a language model, generates additional insights by analyzing the context and semantics of the tweets. This combined approach utilizes probabilistic classification and advanced language understanding to provide comprehensive sentiment analysis results, enhancing the depth and accuracy of sentiment interpretation.Understanding the pivotal role of discerning public sentiment on social media, my model excels in capturing nuanced emotional tones.
In evaluating the sentiment analysis model based on Naive Bayes and LLaMA2 7B architecture, key metrics such as accuracy, precision, recall, and F1 score were employed, alongside the examination of the confusion matrix. Leveraging a diverse dataset of tweets, the model demonstrated high precision and recall, indicating its proficiency in accurately classifying sentiments. The analysis highlighted the model's effectiveness in capturing nuanced sentiment variations, affirming its suitability for real-world sentiment analysis tasks.
To run the Sentiment Analysis Web App on your local machine, follow these steps:
-
Clone the Repository: Begin by cloning the project repository to your local machine using the command:
git clone https://github.com/Tejas911/tweetZ.git
-
Navigate to the Project Directory: Change into the project directory:
cd
-
Run the Jupyter Notebook: Run the jupyter notebook and enter your API Key.
-
Access the Web App: Click on the URL generated by the last code snippet to interact with the Sentiment Analysis Web App. A demo of the app in action is available below:
Enjoy exploring the app and classifying tweets!
- ๐ Kaggle Notebook: Interested in a Kaggle environment? Explore the notebook
- ๐ Dataset Source: Available on
- ๐ค LLM: Hugging Face - LLaMA2 7B