Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from transformers import pipeline
|
|
4 |
pipeline = pipeline(task="translation", model="lgrobol/m2m100_418M_br_fr")
|
5 |
|
6 |
def predict(texts):
|
7 |
-
predictions = pipeline(
|
8 |
return "\n".join(p["translation_text"] for p in predictions)
|
9 |
|
10 |
gr.Interface(
|
|
|
4 |
pipeline = pipeline(task="translation", model="lgrobol/m2m100_418M_br_fr")
|
5 |
|
6 |
def predict(texts):
|
7 |
+
predictions = pipeline(texts.splitlines(), src_lang="br", tgt_lang="fr")
|
8 |
return "\n".join(p["translation_text"] for p in predictions)
|
9 |
|
10 |
gr.Interface(
|