TiberiuCristianLeon commited on
Commit
39ababd
·
verified ·
1 Parent(s): dce1a40

Update src/translate/Translate.py

Browse files
Files changed (1) hide show
  1. src/translate/Translate.py +2 -2
src/translate/Translate.py CHANGED
@@ -54,8 +54,8 @@ def paraphraseTranslateMethod(requestValue: str, model: str):
54
 
55
  def gemma(requestValue: str, model: str = 'Gargaz/gemma-2b-romanian-better'):
56
  requestValue = requestValue.replace('\n', ' ')
57
- prompt = f"Translate this to Romanian using a formal tone. Only return the translation: {requestValue}"
58
- messages = [{"role": "user", "content": f"Translate this text to Romanian using a formal tone, responding only with the translated text: {requestValue}"}]
59
  if '/' not in model:
60
  model = 'Gargaz/gemma-2b-romanian-better'
61
  # limit max_new_tokens to 150% of the requestValue
 
54
 
55
  def gemma(requestValue: str, model: str = 'Gargaz/gemma-2b-romanian-better'):
56
  requestValue = requestValue.replace('\n', ' ')
57
+ prompt = f"Translate this to Romanian using a formal tone, responding only with the translated text: {requestValue}"
58
+ messages = [{"role": "user", "content": f"Translate this text to Romanian: {requestValue}"}]
59
  if '/' not in model:
60
  model = 'Gargaz/gemma-2b-romanian-better'
61
  # limit max_new_tokens to 150% of the requestValue