from transformers import pipeline import gradio as grad model_name = "facebook/nllb-200-distilled-600M" opus_translator = pipeline("translation", model=model_name, src_lang="eng_Latn", tgt_lang="kor_Hang") # model_name = "Helsinki-NLP/opus-mt-tc-big-en-ko" # opus_translator = pipeline("translation", model=model_name) def translate(text): response = opus_translator(text) return response grad.Interface(translate, inputs=["text"], outputs=["text"]).launch()