kuyesu22 commited on
Commit
98d724b
·
verified ·
1 Parent(s): d011e52

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -36,7 +36,7 @@ model.eval()
36
  # Define the inference function for translation
37
  def make_inference(english_text):
38
  # Format the prompt based on the language pair
39
- prompt = f"### English:\n{english_text}\n\n### Runyankole:"
40
  batch = tokenizer(prompt, return_tensors="pt", padding=True, truncation=True, max_length=256).to(model.device)
41
 
42
  # Generate the translation
 
36
  # Define the inference function for translation
37
  def make_inference(english_text):
38
  # Format the prompt based on the language pair
39
+ prompt = f"You are English Runyakole language translator, Runyakoleis a language spoke by the bantu speaking people in western Uganda. Can you appropriately translate these user sentences appropriate and must make sense. ### English:\n{english_text}\n\n### Runyankole:"
40
  batch = tokenizer(prompt, return_tensors="pt", padding=True, truncation=True, max_length=256).to(model.device)
41
 
42
  # Generate the translation