trans / app.py
dffdfdreter's picture
Update app.py
2183a67 verified
raw
history blame
359 Bytes
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="messages")
app.launch(debug=True,share= True)