Spaces:
Sleeping
Sleeping
|
Download README.md from CURI-AI/sentiment-analysis-en: direct link, hf CLI and curl.
- Browser
- Download file 2.9 kB
-
https://huggingface.co/spaces/CURI-AI/sentiment-analysis-en/resolve/main/README.md
- Command line
-
hf download hf://spaces/CURI-AI/sentiment-analysis-en/README.md
-
curl -L -o README.md https://huggingface.co/spaces/CURI-AI/sentiment-analysis-en/resolve/main/README.md
2.9 kB
A newer version of the Gradio SDK is available: 6.32.0
metadata
title: Emotion Analysis
emoji: π
colorFrom: purple
colorTo: yellow
sdk: gradio
sdk_version: 5.42.0
app_file: app.py
pinned: false
π Multimodal Emotion Analyzer
AI model that analyzes 26 different emotions, designed to run on Hugging Face Spaces with Gradio interface.
π Hugging Face Spaces Deployment
1. Clone Repository
git clone https://huggingface.co/spaces/CURI-AI/sentiment-analysis-en
cd sentiment-analysis
2. Copy Files
Copy the following files from the current project to the Spaces repository:
app.py- Main applicationrequirements.txt- Python dependenciesREADME.md- This file
3. Set Environment Variables
Set Hugging Face token to access organization models:
export HF_TOKEN="your-huggingface-token"
4. Commit and Push
git add .
git commit -m "Add emotion analysis app"
git push
π§ Key Features
- 26 Emotion Categories: admiration, aesthetic appreciation, awe, anxiety, fear, horror, disgust, calmness, romantic love, sexual desire, nostalgia, interest, surprise, excitement, anger, pride, triumph, contempt, disappointment, empathic pain, sadness, guilt, envy, amusement, awkwardness, adoration
- Real-time Analysis: Instant emotion analysis from text input
- Visualization: Top emotions chart and overall emotion distribution heatmap
- English Support: Optimized for English text input
π Usage
- Enter English text in the input field
- Click "Submit" button
- View emotion analysis results and visualizations
ποΈ Technology Stack
- Frontend: Gradio
- AI Model: Hugging Face Transformers
- Visualization: Plotly
- Backend: Python
π Environment Variables
HF_TOKEN: Hugging Face access token (for organization model access)
π Example Texts
- "Today was such a happy day! I spent time with friends and had delicious food together."
- "This movie was so scary that I don't think I can sleep tonight. It was truly terrifying."
- "I'm so proud and happy that I got a good grade on the exam. All my hard work paid off."
π Troubleshooting
Model Loading Failure
- Check if
HF_TOKENenvironment variable is set - Verify organization model name (
CURI-AI/sentiment-analysis-en-v1) - Check internet connection
Dependency Errors
pip install -r requirements.txt
π Support
If you encounter issues, check:
- Hugging Face token is properly configured
- Access permissions to organization models
- All dependencies are installed
π Features
- Real Model Integration: Uses CURI-AI organization's trained emotion analysis model
- Fallback Mode: Automatically switches to simulation mode if model loading fails
- Interactive Charts: Beautiful Plotly visualizations for emotion analysis
- Responsive Design: Modern Gradio interface optimized for various screen sizes