Update app.py
Browse filesdevice set to cpu.
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="
|
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 |
|