dffdfdreter commited on
Commit
dbbacff
·
verified ·
1 Parent(s): 2183a67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -1,9 +1,11 @@
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="messages")
9
- app.launch(debug=True,share= True)
 
 
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
+
4
+ def frenchtranslator(message, history):
5
+ client = InferenceClient(model="Helsinki-NLP/opus-mt-vi-en")
6
+ message = client.translation(message).translation_text
7
  return message
8
+
9
+ with gr.Blocks(theme=gr.themes.Soft) as app:
10
+ gr.ChatInterface(fn=frenchtranslator, type="messages")
11
+ app.launch(debug=True, share=True)