Spaces:
Runtime error
Runtime error
File size: 396 Bytes
aca1869 |
1 2 3 4 5 6 7 8 9 10 11 12 |
import gradio as gr
from transformers import pipeline
trans = pipeline("translation", model="haotieu/en-vi-mt-model")
def translation_gradio(input):
result = trans(input)
return result[0]['translation_text']
translation_interface = gr.Interface(fn = translation_gradio, inputs="text", outputs = "text",title="english-vietnamese translation")
translation_interdace.launch(inline=False) |