Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -100,7 +100,7 @@ class Translators:
|
|
| 100 |
def HelsinkiNLP_mulmul(self):
|
| 101 |
try:
|
| 102 |
pipe = pipeline("translation", model=self.model_name, device=self.device)
|
| 103 |
-
iso_dict = {iso[1]: iso[3]
|
| 104 |
iso3tl = iso_dict.get(self.tl) # 'deu', 'ron', 'eng', 'fra'
|
| 105 |
translation = pipe(f'>>{iso3tl}<< {self.input_text}')
|
| 106 |
return translation[0]['translation_text'], f'Translated from {self.sl} to {self.tl} with {self.model_name}.'
|
|
|
|
| 100 |
def HelsinkiNLP_mulmul(self):
|
| 101 |
try:
|
| 102 |
pipe = pipeline("translation", model=self.model_name, device=self.device)
|
| 103 |
+
iso_dict = {iso[1]: iso[3] for iso in non_empty_isos}
|
| 104 |
iso3tl = iso_dict.get(self.tl) # 'deu', 'ron', 'eng', 'fra'
|
| 105 |
translation = pipe(f'>>{iso3tl}<< {self.input_text}')
|
| 106 |
return translation[0]['translation_text'], f'Translated from {self.sl} to {self.tl} with {self.model_name}.'
|