amurienne commited on
Commit
acf7fb1
·
verified ·
1 Parent(s): f4aacb6

Update app.py

Browse files

device set to cpu.

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -11,7 +11,7 @@ def translate(text):
11
  """
12
  Translate the text from source lang fr to target lang br
13
  """
14
- translation_pipeline = pipeline("translation", model=model, tokenizer=tokenizer, src_lang='fr', tgt_lang='br', max_length=400, device="cuda")
15
  result = translation_pipeline(text)
16
  return result[0]['translation_text']
17
 
 
11
  """
12
  Translate the text from source lang fr to target lang br
13
  """
14
+ translation_pipeline = pipeline("translation", model=model, tokenizer=tokenizer, src_lang='fr', tgt_lang='br', max_length=400, device="cpu")
15
  result = translation_pipeline(text)
16
  return result[0]['translation_text']
17