prsingh1982 commited on
Commit
8bed7ff
·
verified ·
1 Parent(s): 6c5b5b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -39,9 +39,9 @@ def translate_eng_heb(source_text):
39
  characters in their corresponding place.
40
  For example, if the english text is 'Aahh!!', replace it with 'Aahh!' before translation.
41
  After translation, replace the !! in the correct place in the hebrew text, אוי!!
42
-
43
  """
44
- prompt = f"{prompt_eng_heb}{source_text}\nAnswer:"
45
  inputs = tokenizer(prompt, return_tensors="pt", truncation=True)
46
  #inputs = {k: v.to("cuda") for k, v in inputs.items()}
47
 
 
39
  characters in their corresponding place.
40
  For example, if the english text is 'Aahh!!', replace it with 'Aahh!' before translation.
41
  After translation, replace the !! in the correct place in the hebrew text, אוי!!
42
+ The text to be translated is enclosed in <text> tags.
43
  """
44
+ prompt = f"{prompt_eng_heb}<text>{source_text}<text>\nAnswer:"
45
  inputs = tokenizer(prompt, return_tensors="pt", truncation=True)
46
  #inputs = {k: v.to("cuda") for k, v in inputs.items()}
47