Translator / app.py
jien0404's picture
Final deployment setup: Configured LFS, gitignore, and updated all files for deployment.
ac29848
Raw History Blame Contribute Delete
701 Bytes
from translation_service import TranslationService
from ui_interface import create_interface
from config import DEFAULT_MODEL_CHOICE
def main():
"""Main function to run the translation app"""
print("Initializing Translation Service...")
# Initialize the translation service
translation_service = TranslationService()
print("Pre-loading popular model...")
translation_service.warm_up_default_model(DEFAULT_MODEL_CHOICE)
print("Creating user interface...")
# Create the Gradio interface
demo = create_interface(translation_service)
print("Starting Gradio app...")
# Launch the app
demo.launch()
if __name__ == "__main__":
main()