Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -646,7 +646,7 @@ def translate(txt,to_lang="en",from_lang=False):
|
|
646 |
for index in range(chunks_length):
|
647 |
ret = ret + ("" if ret == "" else " ") + tokenizer.decode(
|
648 |
model.generate(
|
649 |
-
inputs[0][ index*512:index*512+512 ]
|
650 |
)[0]
|
651 |
)
|
652 |
log(f'RET translate with ret as {ret}')
|
|
|
646 |
for index in range(chunks_length):
|
647 |
ret = ret + ("" if ret == "" else " ") + tokenizer.decode(
|
648 |
model.generate(
|
649 |
+
torch.tensor(list(inputs[0][ index*512:index*512+512 ]))
|
650 |
)[0]
|
651 |
)
|
652 |
log(f'RET translate with ret as {ret}')
|