Update app.py
Browse files
app.py
CHANGED
@@ -11,9 +11,9 @@ 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="
|
15 |
i3 = gr.inputs.Number(default=0.96, label="Threshold percentage score")
|
16 |
-
o1 = gr.outputs.Image(type="pil", label="
|
17 |
o2 = gr.outputs.Textbox(label="Similarity score")
|
18 |
|
19 |
def extract_image(image, text, prob, num=1):
|
|
|
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="Description for section to extracted")
|
15 |
i3 = gr.inputs.Number(default=0.96, label="Threshold percentage score")
|
16 |
+
o1 = gr.outputs.Image(type="pil", label="Extracted Crop part")
|
17 |
o2 = gr.outputs.Textbox(label="Similarity score")
|
18 |
|
19 |
def extract_image(image, text, prob, num=1):
|