llmat commited on
Commit
001f24f
·
verified ·
1 Parent(s): 112707d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -20,8 +20,13 @@ def ocr(image):
20
 
21
  return output
22
 
 
 
 
 
23
  iface = gr.Interface(fn=ocr,
24
- inputs=gr.inputs.Image(type="pil"),
25
  outputs=["text", "image", "text", "text"])
26
 
 
27
  iface.launch()
 
20
 
21
  return output
22
 
23
+ def process_output(output):
24
+ output["step1_image"] = Image.fromarray(output["step1_image"])
25
+ return output
26
+
27
  iface = gr.Interface(fn=ocr,
28
+ inputs=gr.Image(type="pil"),
29
  outputs=["text", "image", "text", "text"])
30
 
31
+ iface.process_output = process_output
32
  iface.launch()