Update app.py
Browse files
app.py
CHANGED
@@ -10,15 +10,15 @@ mocr = MangaOcr()
|
|
10 |
def ocr_text(image):
|
11 |
start = time.time()
|
12 |
text = mocr(image)
|
13 |
-
|
14 |
-
return text
|
15 |
|
16 |
iface = gr.Interface(
|
17 |
fn=ocr_text,
|
18 |
inputs=gr.Image(type='pil'),
|
19 |
-
outputs="text",
|
20 |
title="Manga OCR",
|
21 |
-
description="Extract
|
22 |
)
|
23 |
|
24 |
if __name__ == '__main__':
|
|
|
10 |
def ocr_text(image):
|
11 |
start = time.time()
|
12 |
text = mocr(image)
|
13 |
+
inference_time = time.time() - start
|
14 |
+
return text, f"Temps d'inférence : {inference_time:.2f} secondes"
|
15 |
|
16 |
iface = gr.Interface(
|
17 |
fn=ocr_text,
|
18 |
inputs=gr.Image(type='pil'),
|
19 |
+
outputs=["text", "text"],
|
20 |
title="Manga OCR",
|
21 |
+
description="Extract Manga in lighting speed ⚡",
|
22 |
)
|
23 |
|
24 |
if __name__ == '__main__':
|