Spaces:
Running
on
Zero
Running
on
Zero
Ayushnangia
commited on
Commit
·
6156750
1
Parent(s):
038a94a
fixing legacy issue
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ OCRmodel = AutoModelForSeq2SeqLM.from_pretrained("Bhuvana/t5-base-spellchecker")
|
|
34 |
|
35 |
|
36 |
def correct_spell(inputs):
|
37 |
-
input_ids = OCRtokenizer.encode(inputs, return_tensors='pt')
|
38 |
sample_output = OCRmodel.generate(
|
39 |
input_ids,
|
40 |
do_sample=True,
|
|
|
34 |
|
35 |
|
36 |
def correct_spell(inputs):
|
37 |
+
input_ids = OCRtokenizer.encode(inputs, return_tensors='pt',legacy=False)
|
38 |
sample_output = OCRmodel.generate(
|
39 |
input_ids,
|
40 |
do_sample=True,
|