atatavana commited on
Commit
4e720a7
·
1 Parent(s): ad6bbe5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -73,7 +73,7 @@ def createDataframe(boxes, words, scores):
73
  return df
74
 
75
 
76
- def completepreprocess(pdffile):
77
  t=imageconversion(pdffile)
78
  image = t.convert("RGB")
79
  width,height=image.size
@@ -98,8 +98,8 @@ iface = gr.Interface(fn=completepreprocess,
98
  #inputs=gr.inputs.Image(type="pil",optional=True,label="upload file"),
99
  inputs=[
100
  gr.inputs.File(label="PDF"),
101
- gr.inputs.Dropdown(label="Select the Open Source OCR", choices=["PaddleOCR", "Pytesseract"]),
102
- ],
103
  #inputs=gr.inputs.Image(type="pil")
104
  outputs=[gr.outputs.Image(type="pil", label="annotated image"),"dataframe"] ,
105
  title=title,
 
73
  return df
74
 
75
 
76
+ def completepreprocess(pdffile, ocr_type):
77
  t=imageconversion(pdffile)
78
  image = t.convert("RGB")
79
  width,height=image.size
 
98
  #inputs=gr.inputs.Image(type="pil",optional=True,label="upload file"),
99
  inputs=[
100
  gr.inputs.File(label="PDF"),
101
+ gr.inputs.Dropdown(label="Select the OCR", choices=["PaddleOCR", "Pytesseract"]),
102
+ ],
103
  #inputs=gr.inputs.Image(type="pil")
104
  outputs=[gr.outputs.Image(type="pil", label="annotated image"),"dataframe"] ,
105
  title=title,