Spaces:
Running
Running
gryan-galario
commited on
Commit
•
c20ac67
1
Parent(s):
063c249
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ def manga_ocr(img):
|
|
23 |
img = img.convert('L').convert('RGB')
|
24 |
pixel_values = self.feature_extractor(img, return_tensors="pt").pixel_values
|
25 |
output = model.generate(pixel_values)[0]
|
26 |
-
text = tokenizer.decode(
|
27 |
text = post_process(text)
|
28 |
return text
|
29 |
|
|
|
23 |
img = img.convert('L').convert('RGB')
|
24 |
pixel_values = self.feature_extractor(img, return_tensors="pt").pixel_values
|
25 |
output = model.generate(pixel_values)[0]
|
26 |
+
text = tokenizer.decode(output, skip_special_tokens=True)
|
27 |
text = post_process(text)
|
28 |
return text
|
29 |
|