document-translator / test_models.py
realSenses's picture
Initial deployment
8551297
Raw
History Blame Contribute Delete
449 Bytes
from services.translator import TranslationService
print("Testing translation models...")
translator = TranslationService()
test_text = "Hello, how are you?"
print(f"Original text: {test_text}")
try:
result = translator.translate(test_text, 'en-hi')
print(f"Translated to Hindi: {result}")
print("Model loaded successfully!")
except Exception as e:
print(f"Error loading model: {e}")
import traceback
traceback.print_exc()