mcp-sentiment / README.md
kvpratama's picture
readme
455a2fa

A newer version of the Gradio SDK is available: 5.44.1

Upgrade
metadata
title: Mcp Sentiment
emoji: πŸ‘
colorFrom: indigo
colorTo: red
sdk: gradio
sdk_version: 5.35.0
app_file: app.py
pinned: false
license: mit
short_description: Text Sentiment Analysis

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

Text Sentiment Analysis

A simple web application that analyzes text sentiment using TextBlob and Gradio.

Features

  • Real-time sentiment analysis
  • Returns polarity score (-1 to 1)
  • Returns subjectivity score (0 to 1)
  • Provides sentiment assessment (positive/negative/neutral)

Installation

pip install "gradio[mcp]" textblob

Usage

python app.py

The app will launch in your browser with a simple interface where you can enter text and get sentiment analysis results in JSON format.

Output Format

{
  "polarity": 0.5,
  "subjectivity": 0.6,
  "assessment": "positive"
}
  • Polarity: -1 (most negative) to 1 (most positive)
  • Subjectivity: 0 (objective) to 1 (subjective)
  • Assessment: Overall sentiment classification