Spaces:
Sleeping
Sleeping
Commit
·
b2ffb64
1
Parent(s):
ee4ce79
adding images
Browse files
app.py
CHANGED
@@ -69,12 +69,6 @@ def shot(image, labels_text):
|
|
69 |
print(detections)
|
70 |
return 0
|
71 |
|
72 |
-
# Input
|
73 |
-
|
74 |
-
output = gr.outputs.Image(type="numpy", label="Detected Objects with given Category")
|
75 |
-
|
76 |
-
title = "Object Detection Using Prompts with Zero Shot CLIP Model"
|
77 |
-
|
78 |
with gr.Blocks(title="Zero Shot Object ddetection using Text Prompts") as demo :
|
79 |
gr.Markdown(
|
80 |
"""
|
@@ -87,15 +81,14 @@ with gr.Blocks(title="Zero Shot Object ddetection using Text Prompts") as demo :
|
|
87 |
"""
|
88 |
)
|
89 |
|
90 |
-
|
91 |
-
with gr.
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
button.click(shot,inputt,labels)
|
99 |
|
100 |
|
101 |
demo.launch()
|
|
|
69 |
print(detections)
|
70 |
return 0
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
with gr.Blocks(title="Zero Shot Object ddetection using Text Prompts") as demo :
|
73 |
gr.Markdown(
|
74 |
"""
|
|
|
81 |
"""
|
82 |
)
|
83 |
|
84 |
+
with gr.Row():
|
85 |
+
with gr.Column():
|
86 |
+
inputt = gr.Image(type="numpy", label="Input Image for Classification")
|
87 |
+
labels = gr.Textbox(placeholder="Enter Label/ labels ex. cat,car,door,window,",scale=4)
|
88 |
+
button = gr.Button(value="Locate objects")
|
89 |
+
with gr.Column():
|
90 |
+
outputs = gr.Image(type="numpy", label="Detected Objects with Selected Category")
|
91 |
+
button.click(shot,inputt,labels)
|
|
|
92 |
|
93 |
|
94 |
demo.launch()
|