Spaces:
Sleeping
Sleeping
A newer version of the Streamlit SDK is available:
1.53.1
π Quick Start Guide
Multi-Lingual Product Catalog Translator
π― Overview
This application helps e-commerce sellers translate their product listings into multiple Indian languages using AI-powered translation.
β‘ Quick Setup (5 minutes)
Option 1: Automated Setup (Recommended)
Run the setup script:
# Windows
setup.bat
# Linux/Mac
./setup.sh
Option 2: Manual Setup
Install Dependencies
# Backend cd backend pip install -r requirements.txt # Frontend cd ../frontend pip install -r requirements.txtInitialize Database
cd backend python -c "from database import DatabaseManager; DatabaseManager().initialize_database()"
πββοΈ Running the Application
Option 1: Using VS Code Tasks
- Open Command Palette (
Ctrl+Shift+P) - Run "Tasks: Run Task"
- Select "Start Full Application"
Option 2: Manual Start
Start Backend (Terminal 1):
cd backend python main.pyβ Backend running at: http://localhost:8000
Start Frontend (Terminal 2):
cd frontend streamlit run app.pyβ Frontend running at: http://localhost:8501
π Using the Application
- Open your browser β http://localhost:8501
- Enter product details:
- Product Title (required)
- Product Description (required)
- Category (optional)
- Select languages:
- Source language (or use auto-detect)
- Target languages (Hindi, Tamil, etc.)
- Click "Translate"
- Review and edit translations if needed
- Submit corrections to improve the system
π Key Features
- π Auto Language Detection - Automatically detect source language
- π 15+ Indian Languages - Hindi, Tamil, Telugu, Bengali, and more
- βοΈ Manual Corrections - Edit translations and provide feedback
- π Analytics - View translation history and statistics
- β‘ Batch Processing - Translate multiple products at once
π οΈ Development Mode
The app runs in development mode by default with:
- Mock translation service (fast, no GPU needed)
- Sample translations for common phrases
- Full UI functionality for testing
π Production Mode
To use actual IndicTrans2 models:
- Install IndicTrans2:
pip install git+https://github.com/AI4Bharat/IndicTrans2.git - Update
MODEL_TYPE=indictrans2-1bin.env - Ensure GPU availability (recommended)
π API Documentation
When backend is running, visit:
- Interactive Docs: http://localhost:8000/docs
- API Health: http://localhost:8000/
π§ Troubleshooting
Backend won't start
- Check Python version:
python --version(need 3.9+) - Install dependencies:
pip install -r backend/requirements.txt - Check port 8000 is free
Frontend won't start
- Install Streamlit:
pip install streamlit - Check port 8501 is free
- Ensure backend is running first
Translation errors
- Backend must be running on port 8000
- Check API health at http://localhost:8000
- Review logs in terminal
π‘ Next Steps
- Try the demo: Run
python demo.py - Read full documentation: Check
README.md - Explore the code: Backend in
/backend, Frontend in/frontend - Contribute: Submit issues and pull requests
π€ Support
- Documentation: See
README.mdfor detailed information - API Reference: http://localhost:8000/docs (when running)
- Issues: Report bugs via GitHub Issues
Happy Translating! π