Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
5.46.0
MCP - Sentiment Analysis
Dependencies
gradio[mcp]
textblob
File Structure
app.py
App file for huggingface spaces to build the Gradio app.
server.py
Main file to run the Gradio app.
- Gradio interface with MCP server is launched
- Input = Text from textbox
- Output = JSON with sentiment analysis results (polarity, subjectivity, assessment)
mcp.json
JSON file containing the MCP server configuration. servers = mcp server (sse transport, url)
config.json
JSON file containing the list of MCP servers for the client to connect to.
Functions
analyze_sentiment(text) -> dict