Wootang01 commited on
Commit
ec44c4c
1 Parent(s): 92679b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -1,15 +1,13 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- title = "Document Image Transformer"
5
- 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."
6
- article = "<p style='text-align: center'><a href='https://huggingface.co/microsoft/dit-base-finetuned-rvlcdip' target='_blank'>Huggingface Model</a></p>"
7
 
8
  pipe = pipeline(task="image-classification",
9
  model="microsoft/beit-base-patch16-224-pt22k-ft22k")
10
  gr.Interface.from_pipeline(pipe,
11
  title=title,
12
  description=description,
13
- article=article,
14
  enable_queue=True,
15
  ).launch()
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ title = "Image Classifier"
5
+ description = " To use it, simply add your image, or click one of the examples to load them. Read more at the links below."
 
6
 
7
  pipe = pipeline(task="image-classification",
8
  model="microsoft/beit-base-patch16-224-pt22k-ft22k")
9
  gr.Interface.from_pipeline(pipe,
10
  title=title,
11
  description=description,
 
12
  enable_queue=True,
13
  ).launch()