dffdfdreter commited on
Commit
a3d338e
·
verified ·
1 Parent(s): ddbcf9a

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from huggingface_hub import InferenceClient
3
+ def viet(message, history):
4
+ client = InferenceClient(model="Helsinki-NLP/opus-mt-vn-en")
5
+ message =client.translation(message).translation_text
6
+ return message
7
+ with gr.Blocks(theme=gr.themes.Soft)as app:
8
+ gr.ChatInterface(fn=viet, type="message")
9
+ app.launch(debug=True,share= True)