macadeliccc commited on
Commit
354bf84
1 Parent(s): 27f49d4
Files changed (4) hide show
  1. app.py +6 -3
  2. assets/snowman.jpg +0 -0
  3. assets/traffic.jpg +0 -0
  4. assets/umbrellas.jpg +0 -0
app.py CHANGED
@@ -133,6 +133,9 @@ def gradio_detect_and_draw(image, text_labels):
133
 
134
  with gr.Blocks() as demo:
135
  gr.Markdown("## Owlv2 Object Detection Demo")
 
 
 
136
  with gr.Row():
137
  with gr.Column():
138
  image_input = gr.Image(type="pil", label="Upload or draw an image")
@@ -150,9 +153,9 @@ with gr.Blocks() as demo:
150
  )
151
  # Add examples
152
  examples = [
153
- ["https://huggingface.co/microsoft/kosmos-2-patch14-224/resolve/main/snowman.jpg", "snowman"],
154
- ["https://history.iowa.gov/sites/default/files/primary-sources/images/history-education-pss-transportation-centralpark-source.jpg", "taxi,traffic light"],
155
- ["https://i.pinimg.com/1200x/51/e1/a1/51e1a12517e95725590d3a4b1a7575d7.jpg", "umbrella"]
156
  ]
157
  gr.Examples(examples, inputs=[image_input, text_input])
158
 
 
133
 
134
  with gr.Blocks() as demo:
135
  gr.Markdown("## Owlv2 Object Detection Demo")
136
+ gr.Markdown('Run this space on your own hardware with this command: ```docker run -it -p 7860:7860 --platform=linux/amd64 \
137
+ registry.hf.space/macadeliccc-owlv2-base-patch-16-ensemble-demo:latest python app.py```')
138
+
139
  with gr.Row():
140
  with gr.Column():
141
  image_input = gr.Image(type="pil", label="Upload or draw an image")
 
153
  )
154
  # Add examples
155
  examples = [
156
+ ["assets/snowman.jpg", "snowman"],
157
+ ["assets/traffic.jpg", "taxi,traffic light"],
158
+ ["assets/umbrellas.jpg", "umbrella"]
159
  ]
160
  gr.Examples(examples, inputs=[image_input, text_input])
161
 
assets/snowman.jpg ADDED
assets/traffic.jpg ADDED
assets/umbrellas.jpg ADDED