Predict_Rating / README_HF_SPACE.md
vtdung23's picture
Upload folder using huggingface_hub
c09e844 verified
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

  1. Click the link above to access the live application
  2. Register a new account
  3. Upload a CSV file with comments or enter a single comment
  4. 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:

  1. Check the logs tab above
  2. Review HUGGING_FACE_DEPLOYMENT.md
  3. Open an issue in the repository

πŸ“„ License

MIT License - See LICENSE file for details


Built with ❀️ using FastAPI, PhoBERT, and Hugging Face Spaces