Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -84,7 +84,7 @@ def macro_correct(text):
|
|
84 |
return errors
|
85 |
|
86 |
result = []
|
87 |
-
for probs, source in zip(outputs.logits,
|
88 |
ids = torch.argmax(probs, dim=-1)
|
89 |
tokens_space = tokenizer.decode(ids[1:-1], skip_special_tokens=False)
|
90 |
text_new = tokens_space.replace(" ", "")
|
|
|
84 |
return errors
|
85 |
|
86 |
result = []
|
87 |
+
for probs, source in zip(outputs.logits, [text]):
|
88 |
ids = torch.argmax(probs, dim=-1)
|
89 |
tokens_space = tokenizer.decode(ids[1:-1], skip_special_tokens=False)
|
90 |
text_new = tokens_space.replace(" ", "")
|