vtiw commited on
Commit
8b21536
1 Parent(s): 9c3d415

Added title, description

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -8,6 +8,9 @@ from PIL import Image
8
 
9
  predictor = ocr_predictor(pretrained=True)
10
 
 
 
 
11
  def greet(img):
12
  img.save("out.jpg")
13
  doc = DocumentFile.from_images("out.jpg")
@@ -22,6 +25,6 @@ def greet(img):
22
  res=res + "\n"
23
  return res
24
 
25
- demo = gr.Interface(fn=greet, inputs=gr.Image(type="pil"), outputs="text")
26
 
27
  demo.launch()
 
8
 
9
  predictor = ocr_predictor(pretrained=True)
10
 
11
+ title="DocTR OCR (PDL Demo)"
12
+ description="Upload an image to get the OCR results !"
13
+
14
  def greet(img):
15
  img.save("out.jpg")
16
  doc = DocumentFile.from_images("out.jpg")
 
25
  res=res + "\n"
26
  return res
27
 
28
+ demo = gr.Interface(fn=greet, inputs=gr.Image(type="pil"), outputs="text", title=title, description=description)
29
 
30
  demo.launch()