A web-based application that analyzes the emotional tone of text using natural language processing. Simply input any text and get instant sentiment classification with confidence scores and visual gauges.
Try the app here: https://huggingface.co/spaces/mohataseem/sentivibe
- Real-time Sentiment Analysis: Instantly classify text as Positive, Negative, or Neutral
- Confidence Scoring: Get numerical sentiment scores ranging from -1 (very negative) to +1 (very positive)
- Visual Feedback: Interactive gauge charts to visualize sentiment scores
- Sample Data Analysis: Pre-loaded examples with sentiment distribution visualization
- Easy-to-Use Interface: Clean, intuitive UI built with Gradio
- Python: Core programming language
- TextBlob: Natural language processing library for sentiment analysis
- Gradio: Web interface framework
- Plotly: Interactive data visualization
- Pandas: Data manipulation and analysis
- Clone the repository:
git clone https://github.com/yourusername/sentiment-analysis-tool.git
cd sentiment-analysis-tool- Install required dependencies:
pip install -r requirements.txt- Run the application:
python app.py- Open your browser and navigate to the local URL provided (typically
http://127.0.0.1:7860)
textblob==0.17.1
gradio
plotly
pandas
numpy
- Enter or paste your text in the input box
- Click the "Analyze" button or press Enter
- View the sentiment classification, score, and confidence level
- Check the gauge chart for a visual representation of the sentiment score
- Analyzing customer reviews and feedback
- Monitoring social media sentiment
- Evaluating survey responses
- Assessing email or message tone
- Content moderation
The application uses TextBlob's pre-trained sentiment analyzer, which:
- Polarity Score: Ranges from -1 (most negative) to +1 (most positive)
- Classification Logic:
- Positive: polarity > 0.1
- Negative: polarity < -0.1
- Neutral: polarity between -0.1 and 0.1
- Confidence Levels:
- Very Confident: |score| ≥ 0.5
- Confident: |score| ≥ 0.3
- Somewhat Confident: |score| ≥ 0.1
- Low Confidence: |score| < 0.1
Contributions are welcome! Feel free to:
- Report bugs
- Suggest new features
- Submit pull requests
This project is open source and available under the MIT License.
Mohataseem
- Hugging Face: @mohataseem
- TextBlob for sentiment analysis capabilities
- Gradio for the amazing web interface framework
- Plotly for interactive visualizations