Spaces:
Sleeping
Sleeping
metadata
title: Product Rating Prediction System
emoji: β
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
license: mit
β Product Rating Prediction System
A production-ready AI-powered system for predicting product ratings from Vietnamese customer comments using PhoBERT.
π― Features
- π€ Deep Learning Model: PhoBERT-based sentiment analysis
- π¬ Single & Batch Predictions: Process one comment or thousands via CSV
- π Visual Analytics: Word clouds and rating distribution charts
- π Secure Authentication: JWT-based user management
- π Full-Stack Web App: FastAPI backend + Jinja2 frontend
- ποΈ External Database: PostgreSQL support for scalability
π Quick Start
For Users
- Click the link above to access the live application
- Register a new account
- Upload a CSV file with comments or enter a single comment
- View predictions, visualizations, and download results
For Developers
This Space requires environment variables to connect to an external PostgreSQL database. See HUGGING_FACE_DEPLOYMENT.md for setup instructions.
π API Documentation
Once the app is running, access:
- Swagger UI:
/docs - ReDoc:
/redoc
π§ Technology Stack
- Backend: FastAPI, SQLAlchemy, Uvicorn
- ML/NLP: PyTorch, Transformers, PhoBERT
- Frontend: Jinja2, TailwindCSS, Chart.js
- Database: PostgreSQL (external)
- Security: JWT, bcrypt
π Documentation
π³ Docker
This Space uses the Docker SDK to support heavy ML models (>500MB). The container runs on port 7860 as required by Hugging Face Spaces.
π Privacy & Security
- All passwords are hashed with bcrypt
- JWT tokens for secure authentication
- External PostgreSQL database with SSL
- No data stored in the container (stateless)
π Model Information
- Base Model: PhoBERT (Vietnamese BERT)
- Task: Sentiment Analysis β Rating Prediction (1-5 stars)
- Language: Vietnamese
- Model Size: ~500MB
π Support
For issues or questions:
- Check the logs tab above
- Review HUGGING_FACE_DEPLOYMENT.md
- Open an issue in the repository
π License
MIT License - See LICENSE file for details
Built with β€οΈ using FastAPI, PhoBERT, and Hugging Face Spaces