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

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