File size: 358 Bytes
a3d338e
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
import gradio as gr
from huggingface_hub import InferenceClient
def viet(message, history):
    client = InferenceClient(model="Helsinki-NLP/opus-mt-vn-en")
    message =client.translation(message).translation_text
    return message
with gr.Blocks(theme=gr.themes.Soft)as app:
    gr.ChatInterface(fn=viet, type="message")
app.launch(debug=True,share= True)