Spaces:
Sleeping
Sleeping
update src and tgt lang
Browse files
app.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
translater_en_ss = pipeline("translation", model="dsfsi/en-ss-m2m100-combo")
|
5 |
-
translater_ss_en = pipeline("translation", model="dsfsi/ss-en-m2m100-combo")
|
6 |
|
7 |
def translate(inp, direction):
|
8 |
if direction == 'en->ss':
|
@@ -32,8 +32,8 @@ iface = gr.Interface(
|
|
32 |
article=article,
|
33 |
examples=examples,
|
34 |
inputs=[
|
35 |
-
gr.
|
36 |
-
gr.
|
37 |
choices=[
|
38 |
'en->ss',
|
39 |
'ss->en'],
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
translater_en_ss = pipeline("translation", model="dsfsi/en-ss-m2m100-combo", src_lang="en", tgt_lang="ss")
|
5 |
+
translater_ss_en = pipeline("translation", model="dsfsi/ss-en-m2m100-combo", src_lang="ss", tgt_lang="en")
|
6 |
|
7 |
def translate(inp, direction):
|
8 |
if direction == 'en->ss':
|
|
|
32 |
article=article,
|
33 |
examples=examples,
|
34 |
inputs=[
|
35 |
+
gr.components.Textbox(lines=5, placeholder="Enter text (maximum 5 lines)", label="Input"),
|
36 |
+
gr.components.Radio(
|
37 |
choices=[
|
38 |
'en->ss',
|
39 |
'ss->en'],
|