Spaces:
Sleeping
Sleeping
| # 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 | |
| 1. `analyze_sentiment(text) -> dict` | |