Spaces:
Runtime error
Runtime error
import gradio as gr | |
from transformers import pipeline | |
model_checkpoint = "huynguyen208/fantastic4-finetuned-vi-to-en-PhoMT-demo" | |
translator = pipeline("translation", model=model_checkpoint) | |
def translate(Vietnamese): | |
return translator(Vietnamese)#[0]['translation_text'] | |
iface = gr.Interface(fn=translate, | |
inputs=["text"], | |
outputs="text", | |
title = 'Translate Vietnamese to English', | |
description = 'Mini Translator') | |
iface.launch(inline = False) |