Spaces:
Runtime error
Runtime error
kushagra124
commited on
Commit
•
739883b
1
Parent(s):
afd6f20
adding text box
Browse files
app.py
CHANGED
@@ -62,15 +62,12 @@ def shot(image, labels_text):
|
|
62 |
|
63 |
detections = detect_using_clip(image,prompts=prompts)
|
64 |
print("detections :",detections)
|
65 |
-
|
66 |
-
|
67 |
-
def add_text(text):
|
68 |
-
labels = text.split(',')
|
69 |
-
return labels
|
70 |
|
71 |
iface = gr.Interface(fn=shot,
|
72 |
inputs = ["image","text",gr.Dropdown(classes, label="Category Label",info='Select Categories')],
|
73 |
-
outputs="
|
74 |
description="Add a picture and a list of labels separated by commas",
|
75 |
title="Zero-shot Image Classification with Prompt ",
|
76 |
examples=[["images/room.jpg","bed,table,plant"]],
|
|
|
62 |
|
63 |
detections = detect_using_clip(image,prompts=prompts)
|
64 |
print("detections :",detections)
|
65 |
+
|
66 |
+
return 0
|
|
|
|
|
|
|
67 |
|
68 |
iface = gr.Interface(fn=shot,
|
69 |
inputs = ["image","text",gr.Dropdown(classes, label="Category Label",info='Select Categories')],
|
70 |
+
outputs="image",
|
71 |
description="Add a picture and a list of labels separated by commas",
|
72 |
title="Zero-shot Image Classification with Prompt ",
|
73 |
examples=[["images/room.jpg","bed,table,plant"]],
|