Spaces:
Build error
Build error
use the correct tokenizer
Browse files
app.py
CHANGED
|
@@ -32,10 +32,9 @@ def feedback(text):
|
|
| 32 |
if len(corrections) == 0:
|
| 33 |
feedback = f'Looks good! Keep up the good work'
|
| 34 |
else:
|
| 35 |
-
suggestion =
|
| 36 |
feedback = f'\'{suggestion}\' might be a little better'
|
| 37 |
return f'FEEDBACK: {feedback}'
|
| 38 |
-
return "Great stuff"
|
| 39 |
|
| 40 |
iface = gr.Interface(
|
| 41 |
chat,
|
|
|
|
| 32 |
if len(corrections) == 0:
|
| 33 |
feedback = f'Looks good! Keep up the good work'
|
| 34 |
else:
|
| 35 |
+
suggestion = grammar_tokenizer.batch_decode(corrections[0], skip_special_tokens=True)
|
| 36 |
feedback = f'\'{suggestion}\' might be a little better'
|
| 37 |
return f'FEEDBACK: {feedback}'
|
|
|
|
| 38 |
|
| 39 |
iface = gr.Interface(
|
| 40 |
chat,
|