Spaces:
Sleeping
Sleeping
title: Sentiment Analyzer | |
emoji: π | |
colorFrom: yellow | |
colorTo: red | |
sdk: gradio | |
sdk_version: 5.17.1 | |
app_file: app.py | |
pinned: false | |
license: apache-2.0 | |
# Sentiment Analyzer | |
An interactive tool for sentiment analysis using the `nlptown/bert-base-multilingual-uncased-sentiment` model. Built with Gradio and deployed on Hugging Face Spaces. | |
## Features | |
- **Sentiment Analysis**: Predicts sentiment on a 1 to 5-star scale. | |
- **Multilingual Support**: Works with multiple languages. | |
- **User-Friendly Interface**: Simple input and output for quick analysis. | |
- **No Installation Required**: Use it directly online. | |
## Access the App | |
Try it here: | |
[https://huggingface.co/spaces/RawadAlghamdi/sentiment-analyzer](https://huggingface.co/spaces/RawadAlghamdi/sentiment-analyzer) | |
## Running Locally (Optional) | |
To run the app on your machine: | |
1. Install dependencies: | |
```bash | |
pip install gradio transformers torch | |
``` | |
2. Run the application: | |
```bash | |
python app.py | |
``` | |
3. Open the provided local URL in your browser. | |
## How It Works | |
1. Enter a sentence or paragraph into the input box. | |
2. Click submit to analyze the sentiment. | |
3. The predicted sentiment (1 to 5 stars) appears in the output box. | |
## Customization | |
- Replace the model in `pipeline("sentiment-analysis", model="nlptown/bert-base-multilingual-uncased-sentiment")` to test other sentiment analysis models. | |
- Modify `examples` to add more test inputs. | |
## License | |
Licensed under the **Apache License 2.0**. See [LICENSE](LICENSE) for details. |