Spaces:
Runtime error
Runtime error
Salmaelbarbori
commited on
Commit
·
4634294
1
Parent(s):
ed7b1f8
Update app.py
Browse files
app.py
CHANGED
@@ -13,9 +13,9 @@ def translation(text):
|
|
13 |
#inference
|
14 |
inputs = tokenizer("translate to arabic : " + text, return_tensors="pt", skip_special_tokens = True)
|
15 |
output = model.generate(**inputs)
|
16 |
-
output = tokenizer.decode(output.cpu().numpy()[0])
|
17 |
|
18 |
-
return output
|
19 |
|
20 |
|
21 |
if __name__ == '__main__':
|
|
|
13 |
#inference
|
14 |
inputs = tokenizer("translate to arabic : " + text, return_tensors="pt", skip_special_tokens = True)
|
15 |
output = model.generate(**inputs)
|
16 |
+
output = tokenizer.decode(output.cpu().numpy()[0], skip_special_tokens = True)
|
17 |
|
18 |
+
return output
|
19 |
|
20 |
|
21 |
if __name__ == '__main__':
|