A newer version of the Gradio SDK is available: 6.13.0
metadata
title: Twitter Sentiment Analysis
emoji: π
colorFrom: blue
colorTo: pink
sdk: gradio
sdk_version: 4.37.2
app_file: app.py
pinned: false
π Twitter Sentiment Analysis
A simple Sentiment Analysis App built with NLTK, NumPy, and Gradio.
The model is trained on Twitter samples and classifies tweets as Positive π or Negative π‘.
π Features
- Preprocessed Twitter dataset using NLTK
- Naive Bayes Classifier for sentiment prediction
- Interactive Gradio UI for testing tweets
- Stores predictions for future analysis
πΈ Demo
Try it live: Gradio Link
π οΈ Installation
Clone the repository:
git clone https://github.com/yourusername/twitter-sentiment-analysis.git
cd twitter-sentiment-analysis
Create a virtual environment and install dependencies:
pip install -r requirements.txt
Run the app:
python app.py
π Project Structure
twitter-sentiment-analysis/
βββ app.py # Gradio app
βββ model.py # Sentiment prediction logic
βββ requirements.txt # Dependencies
βββ README.md # Project documentation
π€ Contributing
Pull requests are welcome! For major changes, open an issue first to discuss what youβd like to improve.
β Support Me
If you like this project, consider buying me a coffee ββ€οΈ
π¨βπ» Author
Sami Ali
- [LinkedIn(https://www.linkedin.com/in/samihali/)]
- [Portfolio(https://alisami.vercel.app/)]
