--- title: Vietnamese Sentiment Analyzer emoji: 💬 colorFrom: blue colorTo: indigo sdk: gradio sdk_version: 5.49.1 app_file: app.py pinned: false --- # Vietnamese Sentiment Analyzer Upload an Excel file, run Vietnamese sentiment classification, and download the resulting Excel file with a `Sentiment` column. ## Required columns - `Title` - `Content` - `Description` - `Type` For `Type` ending in `Comment`, the app classifies `Content`. For `Type` ending in `Topic`, it combines `Content`, `Title`, and `Description`. ## Deploy on Hugging Face Spaces 1. Create a new Space at https://huggingface.co/new-space 2. Select **Gradio** as the SDK. 3. Upload `app.py`, `requirements.txt`, and `README.md` from this project. 4. Wait for the Space to build and the model to download. 5. Open the Space, upload an `.xlsx` file, click **Chạy sentiment**, then download the output. The default model is `5CD-AI/Vietnamese-Sentiment-visobert`. You can change the model ID in the interface or set `SENTIMENT_MODEL_PATH` in Space variables. ## Notes - CPU Spaces can be slow for large files. GPU hardware is optional and may incur cost. - `SENTIMENT_FP16=1` enables half precision only when CUDA is available. - `.xlsx` is recommended. `.xls` input may require the optional `xlrd` package depending on the file format; if needed, add `xlrd` to `requirements.txt`.