Emotion-server-demo offers a comprehensive Docker Compose setup for the Emotion API service. With an integrated Gradio UI and an MCP server, it facilitates seamless experimentation and access. Additional projects include a sentiment monitoring dashboard and AI-powered customer service demonstrations, enriching the user experience with insightful interactions and real-time analysis.
Emotion Server Demo
The Emotion Server Demo provides a comprehensive Docker Compose setup for the Emotion API service, designed for seamless experimentation and interaction through a Gradio UI and a powerful MCP server. This stack facilitates easy access to emotion prediction capabilities through intuitive interfaces.

Key Features
- Performance Testing: A dedicated Performance Tab for conducting load tests on the container, ensuring the system's robustness.
- Live Demo: Experience the Emotion service handling significant workloads in real-time through a demonstration available on YouTube.
Included Projects
The repository houses additional projects to enrich the user experience:
Demo_Firehose Project
- Location:
src/Demo_Firehose/ - Description: A React-based interface for monitoring social media sentiment with features such as:
- Real-time message streaming with sentiment analysis
- Interactive dashboard with visual elements like circular gauges and progress bars
- Configurable message generation speed
- Color-coded sentiment representations
- Real-time API status monitoring
Demo_Agentic_Routing Project
- Location:
src/Demo_Agentic_Routing/ - Description: A customer service demonstration using CrewAI for emotion-driven routing and escalation, featuring:
- Multi-agent sentiment analysis
- Automatic escalation based on customer emotions
- Integration with CrewAI framework for agent orchestration
- Simulated customer service workflows with quality monitoring capabilities
Architecture Breakdown
The Emotion service is powered by a robust architecture consisting of:
- Emotion API (emotion-api): The core Go server utilizing llama.cpp for emotion analysis, integrated into a Docker container with a fine-tuned model. More information can be found at the Docker Hub repository.
- Gradio UI (emotion-ui): A user-friendly web interface for easy interaction with the Emotion API and MCP server.
- MCP Server (emotion-mcp): Acts as a proxy, employing the Model Context Protocol (MCP) to facilitate communication between the UI and the Emotion API.
Service Interaction
Access the Emotion Server through the following ports once Docker containers are running:
- Gradio UI: http://localhost:7860
- Emotion API: http://localhost:8000
- MCP Server: http://localhost:9000
Users can interact with the service, input text, and receive real-time emotion predictions through the Gradio interface.
API Testing
The Emotion API can be tested via command-line using curl, allowing for quick verification and integration into scripts. Examples of requests include:
curl -s -X POST http://localhost:8000/predict \
-H "Content-Type: application/json" \
-d '{"text":"I am so happy today!"}'
For detailed emotion analysis, the endpoint /predict_detailed provides comprehensive insights into the emotional landscape:
curl -s -X POST http://localhost:8000/predict_detailed \
-H "Content-Type: application/json" \
-d '{"text":"I am so happy today!"}'
Hosted API Alternative
For users preferring not to run the Emotion Service locally, a hosted version is available:
- Hosted API Endpoint:
https://stevef1uk--emotion-server-serve.modal.run/predict - MCP Server Endpoint:
https://stevef1uk--mcp-emotion-server-working-solution-serve.modal.run/mcp
Testing the hosted API can be done similarly through curl calls, ensuring flexibility in deployment approaches.
Conclusion
The Emotion Server Demo stands as a comprehensive toolkit for sentiment analysis and emotion prediction through a structured API, interactive UI, and support for various deployment strategies. It encourages experimentation and exploration in understanding human emotions through technology.
No comments yet.
Sign in to be the first to comment.