Spaces:
Running
Running
gryan-galario
commited on
Commit
·
19bed24
1
Parent(s):
efaeb0c
Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,8 @@ model = VisionEncoderDecoderModel.from_pretrained("kha-white/manga-ocr-base")
|
|
12 |
|
13 |
feature_extractor = AutoFeatureExtractor.from_pretrained("kha-white/manga-ocr-base")
|
14 |
|
|
|
|
|
15 |
def post_process(text):
|
16 |
text = ''.join(text.split())
|
17 |
text = text.replace('…', '...')
|
@@ -34,8 +36,10 @@ iface = gr.Interface(
|
|
34 |
layout="horizontal",
|
35 |
theme="huggingface",
|
36 |
title="Manga OCR",
|
37 |
-
description="
|
38 |
allow_flagging='never',
|
|
|
|
|
39 |
)
|
40 |
|
41 |
iface.launch()
|
|
|
12 |
|
13 |
feature_extractor = AutoFeatureExtractor.from_pretrained("kha-white/manga-ocr-base")
|
14 |
|
15 |
+
examples = ["00.jpg", "01.jpg", "02.jpg", "03.jpg", "04.jpg", "05.jpg", "06.jpg", "07.jpg", "08.jpg", "09.jpg", "10.jpg", "11.jpg"]
|
16 |
+
|
17 |
def post_process(text):
|
18 |
text = ''.join(text.split())
|
19 |
text = text.replace('…', '...')
|
|
|
36 |
layout="horizontal",
|
37 |
theme="huggingface",
|
38 |
title="Manga OCR",
|
39 |
+
description="Optical Character Recognization for Japanese Texts with focus on Mangas. The model is trained by kha-white with Github link: <a href=\"https://github.com/kha-white/manga-ocr\">manga-ocr</a> while the Space App is made by me.",
|
40 |
allow_flagging='never',
|
41 |
+
examples=examples,
|
42 |
+
article = "Author: <a href=\"https://huggingface.co/gryan-galario\">Gryan Galario</a>",
|
43 |
)
|
44 |
|
45 |
iface.launch()
|