ivelin commited on
Commit
a8e6b52
·
1 Parent(s): ee5f1b4

fix: add 3rd param for model revision to examples

Browse files
Files changed (1) hide show
  1. app.py +22 -22
app.py CHANGED
@@ -196,28 +196,28 @@ def process_refexp(image: Image, prompt: str, model_revision: str = 'main'):
196
  title = "Demo: GuardianUI RefExp Click"
197
  description = "Gradio Demo for Donut RefExp task, an instance of `VisionEncoderDecoderModel` fine-tuned on [UIBert RefExp](https://huggingface.co/datasets/ivelin/ui_refexp_saved) Dataset (UI Referring Expression). To use it, simply upload your image and type a prompt and click 'submit', or click one of the examples to load them. Optionally enter value for model git revision; latest checkpoint will be used by default."
198
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2111.15664' target='_blank'>Donut: OCR-free Document Understanding Transformer</a> | <a href='https://github.com/clovaai/donut' target='_blank'>Github Repo</a></p>"
199
- examples = [["example_1.jpg", "select the setting icon from top right corner"],
200
- ["example_1.jpg", "click on down arrow beside the entertainment"],
201
- ["example_1.jpg", "select the down arrow button beside lifestyle"],
202
- ["example_1.jpg", "click on the image beside the option traffic"],
203
- ["example_3.jpg", "select the third row first image"],
204
- ["example_3.jpg", "click the tick mark on the first image"],
205
- ["example_3.jpg", "select the ninth image"],
206
- ["example_3.jpg", "select the add icon"],
207
- ["example_3.jpg", "click the first image"],
208
- ["val-image-4.jpg", 'select 4153365454'],
209
- ['val-image-4.jpg', 'go to cell'],
210
- ['val-image-4.jpg', 'select number above cell'],
211
- ["val-image-1.jpg", "select calendar option"],
212
- ["val-image-1.jpg", "select photos&videos option"],
213
- ["val-image-2.jpg", "click on change store"],
214
- ["val-image-2.jpg", "click on shop menu at the bottom"],
215
- ["val-image-3.jpg", "click on image above short meow"],
216
- ["val-image-3.jpg", "go to cat sounds"],
217
- ["example_2.jpg", "click on green color button"],
218
- ["example_2.jpg", "click on text which is beside call now"],
219
- ["example_2.jpg", "click on more button"],
220
- ["example_2.jpg", "enter the text field next to the name"],
221
  ]
222
 
223
  demo = gr.Interface(fn=process_refexp,
 
196
  title = "Demo: GuardianUI RefExp Click"
197
  description = "Gradio Demo for Donut RefExp task, an instance of `VisionEncoderDecoderModel` fine-tuned on [UIBert RefExp](https://huggingface.co/datasets/ivelin/ui_refexp_saved) Dataset (UI Referring Expression). To use it, simply upload your image and type a prompt and click 'submit', or click one of the examples to load them. Optionally enter value for model git revision; latest checkpoint will be used by default."
198
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2111.15664' target='_blank'>Donut: OCR-free Document Understanding Transformer</a> | <a href='https://github.com/clovaai/donut' target='_blank'>Github Repo</a></p>"
199
+ examples = [["example_1.jpg", "select the setting icon from top right corner", ""],
200
+ ["example_1.jpg", "click on down arrow beside the entertainment", ""],
201
+ ["example_1.jpg", "select the down arrow button beside lifestyle", ""],
202
+ ["example_1.jpg", "click on the image beside the option traffic", ""],
203
+ ["example_3.jpg", "select the third row first image", ""],
204
+ ["example_3.jpg", "click the tick mark on the first image", ""],
205
+ ["example_3.jpg", "select the ninth image", ""],
206
+ ["example_3.jpg", "select the add icon", ""],
207
+ ["example_3.jpg", "click the first image", ""],
208
+ ["val-image-4.jpg", 'select 4153365454', ""],
209
+ ['val-image-4.jpg', 'go to cell', ""],
210
+ ['val-image-4.jpg', 'select number above cell', ""],
211
+ ["val-image-1.jpg", "select calendar option", ""],
212
+ ["val-image-1.jpg", "select photos&videos option", ""],
213
+ ["val-image-2.jpg", "click on change store", ""],
214
+ ["val-image-2.jpg", "click on shop menu at the bottom", ""],
215
+ ["val-image-3.jpg", "click on image above short meow", ""],
216
+ ["val-image-3.jpg", "go to cat sounds", ""],
217
+ ["example_2.jpg", "click on green color button", ""],
218
+ ["example_2.jpg", "click on text which is beside call now", ""],
219
+ ["example_2.jpg", "click on more button", ""],
220
+ ["example_2.jpg", "enter the text field next to the name", ""],
221
  ]
222
 
223
  demo = gr.Interface(fn=process_refexp,