Update app.py
Browse files
app.py
CHANGED
@@ -10,10 +10,10 @@ dmodel = DetrForObjectDetection.from_pretrained('facebook/detr-resnet-50')
|
|
10 |
model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32")
|
11 |
processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
|
12 |
|
13 |
-
i1 = gr.inputs.Image(type="pil")
|
14 |
-
i2 = gr.inputs.Textbox()
|
15 |
-
o1 = gr.outputs.Image(type="pil")
|
16 |
-
o2 = gr.outputs.Textbox()
|
17 |
|
18 |
def extract_image(image, text, num=1):
|
19 |
|
|
|
10 |
model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32")
|
11 |
processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
|
12 |
|
13 |
+
i1 = gr.inputs.Image(type="pil", label="Input image")
|
14 |
+
i2 = gr.inputs.Textbox(label="Input text")
|
15 |
+
o1 = gr.outputs.Image(type="pil", label="Cropped part")
|
16 |
+
o2 = gr.outputs.Textbox(label="Similarity score")
|
17 |
|
18 |
def extract_image(image, text, num=1):
|
19 |
|