Spaces:
Running
Running
File size: 3,798 Bytes
e3b42fa 7d55822 e3b42fa 7d55822 e3b42fa 7d55822 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
---
title: sentiment-analysis
app_file: app.py
sdk: gradio
sdk_version: 5.25.0
---
# 🎯 Análise de Sentimento em Avaliações de Produtos
Este sistema analisa o sentimento em avaliações de produtos em português usando o modelo BERT com fine-tuning em dados do e-commerce brasileiro.
## 🤖 Modelo
Utiliza o modelo [BERT fine-tuned para análise de sentimentos](https://huggingface.co/layers2024/bert-sentiment), treinado com o dataset [Olist Store](https://www.kaggle.com/datasets/olistbr/brazilian-ecommerce/data), um conjunto público de mais de 100 mil avaliações de e-commerce brasileiro feitas entre 2016 e 2018.
## 🎯 Projeto
Desenvolvido como parte do projeto NLP-Sentinel por [Luciano Ayres](https://linkedin.com/in/lucianoayres).
## 💻 Instalação Local
### Pré-requisitos
- Python 3.10+
- Git (opcional)
### Instalação
1. Clone o repositório:
```bash
git clone [email protected]:lucianoayres/sentiment-analysis-app.git
cd sentiment-analysis-app
```
2. Execute o script de instalação e inicialização:
```bash
./run.sh
```
O script irá:
- Criar um ambiente virtual Python
- Instalar as dependências necessárias
- Iniciar a aplicação
## 🌐 Demo Online
Você pode acessar uma versão online da aplicação em:
[https://huggingface.co/spaces/layers2024/analise-de-sentimentos-avaliacao-de-produtos](https://huggingface.co/spaces/layers2024/analise-de-sentimentos-avaliacao-de-produtos)
Gradio will:
- Start a local server (usually accessible at [http://localhost:7860](http://localhost:7860))
- Print a shareable public URL (if `share=True` is set) so that you can try your app in your browser.
## Deploying Your Gradio App to Hugging Face Spaces
Hugging Face Spaces provides a free and permanent hosting option for your Gradio demo. Follow the steps below to deploy your app using the terminal method:
### 1. Ensure You Have a Hugging Face Account
Make sure you have a free Hugging Face account. If not, [create one here](https://huggingface.co/join).
### 2. Deploy via Terminal
From your app's directory (where your `app.py` and `requirements.txt` reside), simply run:
```bash
gradio deploy
```
This command will gather basic metadata from your project, automatically create a new Space for you, and deploy your Gradio app.
- **To Update Your Space:** Re-run the `gradio deploy` command, or you can enable GitHub Actions to automatically update your Space on git push.
### 3. Access and Share Your App
Once deployed, your app will be live at a URL in the following format:
```
https://<your-username>-<your-space-name>.hf.space
```
Share this URL with others to allow them to interact with your Gradio demo directly from their browsers.
## Additional Information
- **Model Updates:** If you update your model on Hugging Face, the next time your app runs (locally or on Spaces), it will load the latest version.
- **Hot Reload (Local Development):** Instead of running `python app.py`, you can run:
```bash
gradio app.py
```
This enables hot reloading so your changes are automatically reflected in your demo.
- **Troubleshooting:**
- Ensure your virtual environment is activated before installing dependencies and running your script.
- Verify that the package versions in your `requirements.txt` file are compatible with your code.
- The initial launch might take extra time as your model files download from Hugging Face.
For further details, please refer to the [Gradio Documentation](https://gradio.app/docs/) and the [Hugging Face Transformers Documentation](https://huggingface.co/docs/transformers).
=======
# sentiment-analysis-app
App de anális de sentimento em avaliações de produtos em português usando BERT com fine-tuning em dados do e-commerce brasileiro.
>>>>>>> 42cb5fa7402ec14e53cdffc7568dcf02fc9750fe
|