final_project/machinetranslation/translator.py
def english_to_french(english_text):
    """The function that translates from English to French"""
    french_text = language_translator.translate(
        text=english_text,
        model_id='en-fr').get_result().get("translations")[0].get("translation")

    return french_text
The function that translates from English to French
The function that translates from English to French
The function that translates from English to French
def english_to_french(english_text):
    french_text = language_translator.translate(
        text=english_text,
        model_id='en-fr').get_result().get("translations")[0].get("translation")
    return french_text
def english_to_french ( english_text ) : french_text = language_translator . translate ( text = english_text , model_id = 'en-fr' ) . get_result ( ) . get ( "translations" ) [ 0 ] . get ( "translation" ) return french_text
The function that translates from English to French
The function that translates from English to French
"""The function that translates from English to French"""
english_text