Spaces:
Runtime error
Runtime error
huynguyen208
commited on
Commit
•
2c49f9f
1
Parent(s):
6b008ce
Update app.py
Browse files
app.py
CHANGED
@@ -6,10 +6,10 @@ model_checkpoint = "huynguyen208/fantastic4-finetuned-vi-to-en-PhoMT-demo"
|
|
6 |
translator = pipeline("translation", model=model_checkpoint)
|
7 |
|
8 |
def translate(Vietnamese):
|
9 |
-
return translator(Vietnamese)[0]['translation_text']
|
10 |
|
11 |
iface = gr.Interface(fn=translate,
|
12 |
-
inputs="text",
|
13 |
outputs="text",
|
14 |
title = 'Translate Vietnamese to English',
|
15 |
description = 'Mini Translator')
|
|
|
6 |
translator = pipeline("translation", model=model_checkpoint)
|
7 |
|
8 |
def translate(Vietnamese):
|
9 |
+
return translator(Vietnamese)#[0]['translation_text']
|
10 |
|
11 |
iface = gr.Interface(fn=translate,
|
12 |
+
inputs=["text"],
|
13 |
outputs="text",
|
14 |
title = 'Translate Vietnamese to English',
|
15 |
description = 'Mini Translator')
|