nielsr HF staff commited on
Commit
609a852
1 Parent(s): dbd7df0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -16,11 +16,11 @@ def classify_image(image):
16
 
17
  return predicted_class
18
 
 
 
19
  title = "Document Image Transformer"
20
  description = "Gradio Demo for DiT, the Document Image Transformer pre-trained on IIT-CDIP, a dataset that includes 42 million document images and fine-tuned on RVL-CDIP, a dataset consisting of 400,000 grayscale images in 16 classes, with 25,000 images per class. To use it, simply add your image, or click one of the examples to load them. Read more at the links below."
21
-
22
  article = "<p style='text-align: center'><a href='https://huggingface.co/microsoft/dit-base-finetuned-rvlcdip' target='_blank'>Huggingface Model</a></p>"
23
-
24
  examples = [
25
  ["coca_cola_advertisement.png"]
26
  ]
16
 
17
  return predicted_class
18
 
19
+ image = gr.inputs.Image(type="pil")
20
+ label = gr.outputs.Label(num_top_classes=3)
21
  title = "Document Image Transformer"
22
  description = "Gradio Demo for DiT, the Document Image Transformer pre-trained on IIT-CDIP, a dataset that includes 42 million document images and fine-tuned on RVL-CDIP, a dataset consisting of 400,000 grayscale images in 16 classes, with 25,000 images per class. To use it, simply add your image, or click one of the examples to load them. Read more at the links below."
 
23
  article = "<p style='text-align: center'><a href='https://huggingface.co/microsoft/dit-base-finetuned-rvlcdip' target='_blank'>Huggingface Model</a></p>"
 
24
  examples = [
25
  ["coca_cola_advertisement.png"]
26
  ]