Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
-
|
4 |
trans = pipeline("translation", model="haotieu/en-vi-mt-model")
|
5 |
-
|
6 |
def translation_gradio(input):
|
7 |
result = trans(input)
|
8 |
return result[0]['translation_text']
|
9 |
-
|
10 |
translation_interface = gr.Interface(fn = translation_gradio, inputs="text", outputs = "text",title="english-vietnamese translation")
|
11 |
|
12 |
-
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
|
|
3 |
trans = pipeline("translation", model="haotieu/en-vi-mt-model")
|
|
|
4 |
def translation_gradio(input):
|
5 |
result = trans(input)
|
6 |
return result[0]['translation_text']
|
7 |
+
|
8 |
translation_interface = gr.Interface(fn = translation_gradio, inputs="text", outputs = "text",title="english-vietnamese translation")
|
9 |
|
10 |
+
translation_interface.launch(inline=False)
|