Spaces:
Runtime error
Runtime error
Update app.py
Browse files3 unmodified lines456789101112131415163 unmodified linesfrom transformers import pipeline# νκ΅μ΄ -> μμ΄ λ²μtranslator = pipeline("translation_en_ko", model="Helsinki-NLP/opus-mt-ko-en")input_text = "μλ νμΈμ, μ¬λ¬λΆ μ΄λμ?"output_text = translator(input_text)[0]["translation_text"]print(f"Input: {input_text}\nOutput: {output_text}")# μμ΄ -> νκ΅μ΄ λ²μtranslator = pipeline("translation_en_to_ko", model="EleutherAI/pile-small-cased-v2")input_text = "Hello, how are you doing today?"output_text = translator(input_text)[0]["translation_text"]print(f"\nInput: {input_text}\nOutput: {output_text}")3 unmodified lines456789101112131415163 unmodified linesfrom transformers import pipeline# νκ΅μ΄ -> μμ΄ λ²μtranslator_ko_to_en = pipeline("translation_en_ko", model="Helsinki-NLP/opus-mt-ko-en")input_text_ko = "μλ νμΈμ, μ¬λ¬λΆ μ΄λμ?"output_text_en = translator_ko_to_en(input_text_ko)[0]["translation_text"]print(f"Korean to English\nInput: {input_text_ko}\nOutput: {output_text_en}")# μμ΄ -> νκ΅μ΄ λ²μtranslator_en_to_ko = pipeline("translation_en_to_ko", model="EleutherAI/pile-small-cased-v2")input_text_en = "Hello, how are you doing today?"output_text_ko = translator_en_to_ko(input_text_en)[0]["translation_text"]print(f"\nEnglish to Korean\nInput: {input_text_en}\nOutput: {output_text_ko}")
app.py+8-8