LiamKhoaLe commited on
Commit
95a3120
·
1 Parent(s): 1d46eb9

Add Vietnamese translation functionality with Helsinki-NLP/opus-mt-en-vi model

Browse files

- Created vi/ module with VietnameseTranslator class
- Added UI checkbox for Vietnamese translation toggle
- Integrated translation into SFT and RAG processing workflows
- Updated Dockerfile to download model during build
- Added comprehensive logging and error handling
- Updated requirements.txt with transformers and torch dependencies

Files changed (1) hide show
  1. vi/processing.py +1 -1
vi/processing.py CHANGED
@@ -92,4 +92,4 @@ def log_translation_stats(stats: Dict[str, Any], translated_count: int) -> None:
92
  translated_count: Number of items translated
93
  """
94
  stats["vietnamese_translated"] = translated_count
95
- logger.info(f"Vietnamese translation completed: {translated_count} items translated")
 
92
  translated_count: Number of items translated
93
  """
94
  stats["vietnamese_translated"] = translated_count
95
+ logger.info(f"Vietnamese translation completed: {translated_count} items translated")