Files changed (1) hide show
  1. app.py +25 -0
app.py CHANGED
@@ -186,6 +186,31 @@ with gr.Blocks(css=css) as demo:
186
  label="Task", value="Caption"
187
  )
188
  text_input = gr.Textbox(label="Text Input (is Optional)", visible=False)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  submit_btn = gr.Button(value="Submit")
190
  with gr.Column():
191
  output_text = gr.Textbox(label="Results")
 
186
  label="Task", value="Caption"
187
  )
188
  text_input = gr.Textbox(label="Text Input (is Optional)", visible=False)
189
+ gr.Examples(
190
+ examples=[
191
+ [
192
+ "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg?download=true",
193
+ "Detailed Caption",
194
+ "",
195
+ ],
196
+ [
197
+ "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg?download=true",
198
+ "Object Detection",
199
+ "",
200
+ ],
201
+ [
202
+ "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg?download=true",
203
+ "Caption to Phrase Grounding",
204
+ "A green car parked in front of a yellow building."
205
+ ],
206
+ [
207
+ "https://datasets-server.huggingface.co/assets/huggingface/documentation-images/--/566a43334e8b6331dddd8142495bc2f3209f32b0/--/default/validation/3/image/image.jpg?Expires=1718892641&Signature=GFpkyFBNrVf~Mq0jFjbpXWQLCOQblOm6Y1R57zl0tZOKWg5lfK8Jv1Tkxv35sMOARYDiJEE7C0hIp0fKazo1lYbv0ZTAKkwHUY2RroifVea4JRCyovJVptsmIZnlXkJU68N7bJhh8K07cu04G5mqaLRRehqDABKqEqgIdtBS5WcUXdoqkl0Fh2c8KN3GK9hZba9E6ZouBXhuffEEzykss1pIm6MW-WLx5l7~RXKu6BwcFq~6--3KoYVM4U~aEQdgTJg6P2ESH4DkEWN8Qpf~vaHBi2CZQSGurM1U0sZqIYrSLPaUov1h00MQMmnNEzMDZUeIq7~j07hVmwWgflQZeA__&Key-Pair-Id=K3EI6M078Z3AC3",
208
+ "OCR",
209
+ ""
210
+ ]
211
+ ],
212
+ inputs=[input_image, task_dropdown, text_input],
213
+ )
214
  submit_btn = gr.Button(value="Submit")
215
  with gr.Column():
216
  output_text = gr.Textbox(label="Results")