Spaces:
Runtime error
Runtime error
macadeliccc
commited on
Commit
•
354bf84
1
Parent(s):
27f49d4
images
Browse files- app.py +6 -3
- assets/snowman.jpg +0 -0
- assets/traffic.jpg +0 -0
- 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 |
-
["
|
154 |
-
["
|
155 |
-
["
|
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