Snowad commited on
Commit
7155387
1 Parent(s): 68066e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -10,15 +10,15 @@ mocr = MangaOcr()
10
  def ocr_text(image):
11
  start = time.time()
12
  text = mocr(image)
13
- print(time.time() - start)
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 text from manga",
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__':