Update app.py
Browse files
app.py
CHANGED
|
@@ -10,11 +10,11 @@ dmodel = YolosForObjectDetection.from_pretrained('hustvl/yolos-tiny')
|
|
| 10 |
model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32")
|
| 11 |
processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
|
| 12 |
|
| 13 |
-
i1 = gr.
|
| 14 |
-
i2 = gr.
|
| 15 |
-
i3 = gr.
|
| 16 |
-
o1 = gr.
|
| 17 |
-
o2 = gr.
|
| 18 |
|
| 19 |
def extract_image(image, text, prob, num=1):
|
| 20 |
|
|
|
|
| 10 |
model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32")
|
| 11 |
processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
|
| 12 |
|
| 13 |
+
i1 = gr.Image(type="pil", label="Input image")
|
| 14 |
+
i2 = gr.Textbox(label="Description for section to extracted")
|
| 15 |
+
i3 = gr.Number(default=0.96, label="Threshold percentage score")
|
| 16 |
+
o1 = gr.Image(type="pil", label="Extracted Crop part")
|
| 17 |
+
o2 = gr.Textbox(label="Similarity score")
|
| 18 |
|
| 19 |
def extract_image(image, text, prob, num=1):
|
| 20 |
|