File size: 409 Bytes
55cf467
9e4ab2e
a8baeff
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
from transformers import pipeline
import gradio as gr
pipe = pipeline("text2text-generation", model="long292/bartpho-word")
def translate_HV(from_text):
  results = translation_pipeline(from_text)
  return results[0]['generated_text']
interface = gr.Interface(fn = translate_HV, inputs=gr.inputs.Textbox(lines=2, placeholder='Text to translate'),
                          outputs = 'text')
interface.launch()