TiberiuCristianLeon commited on
Commit
4939d8b
·
verified ·
1 Parent(s): 7ae8b9e

Update src/Translate.py

Browse files
Files changed (1) hide show
  1. src/Translate.py +2 -2
src/Translate.py CHANGED
@@ -32,10 +32,10 @@ class Translators:
32
  return f"Error translating with model: {self.model_name}! Try other available language combination.", error
33
  def text2textgenerationpipe(self):
34
  translation = pipeline('text2text-generation', model = self.model_name)
35
- return translation(text)[0]['generated_text'], self.message
36
  def translationpipe(self):
37
  translation = pipeline('translation', model = self.model_name)
38
- return translation(text)[0]['translation_text'], self.message
39
 
40
  def paraphraseTranslateMethod(requestValue: str, model: str):
41
  nltk.download('punkt')
 
32
  return f"Error translating with model: {self.model_name}! Try other available language combination.", error
33
  def text2textgenerationpipe(self):
34
  translation = pipeline('text2text-generation', model = self.model_name)
35
+ return translation(self.input_text)[0]['generated_text'], self.message
36
  def translationpipe(self):
37
  translation = pipeline('translation', model = self.model_name)
38
+ return translation(self.input_text)[0]['translation_text'], self.message
39
 
40
  def paraphraseTranslateMethod(requestValue: str, model: str):
41
  nltk.download('punkt')