Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -456,13 +456,13 @@ def main(device, segment_type):
|
|
456 |
|
457 |
controller.reset()
|
458 |
if pipe.tokenizer("man")["input_ids"][1] in pipe.tokenizer(args.prompt)["input_ids"][1:-1]:
|
459 |
-
mask1 = predict_mask(detect_model, sam, image[0], 'man', args.segment_type, confidence=0.
|
460 |
threshold=0.5)
|
461 |
else:
|
462 |
mask1 = None
|
463 |
|
464 |
if pipe.tokenizer("woman")["input_ids"][1] in pipe.tokenizer(args.prompt)["input_ids"][1:-1]:
|
465 |
-
mask2 = predict_mask(detect_model, sam, image[0], 'woman', args.segment_type, confidence=0.
|
466 |
threshold=0.5)
|
467 |
else:
|
468 |
mask2 = None
|
|
|
456 |
|
457 |
controller.reset()
|
458 |
if pipe.tokenizer("man")["input_ids"][1] in pipe.tokenizer(args.prompt)["input_ids"][1:-1]:
|
459 |
+
mask1 = predict_mask(detect_model, sam, image[0], 'man', args.segment_type, confidence=0.10,
|
460 |
threshold=0.5)
|
461 |
else:
|
462 |
mask1 = None
|
463 |
|
464 |
if pipe.tokenizer("woman")["input_ids"][1] in pipe.tokenizer(args.prompt)["input_ids"][1:-1]:
|
465 |
+
mask2 = predict_mask(detect_model, sam, image[0], 'woman', args.segment_type, confidence=0.10,
|
466 |
threshold=0.5)
|
467 |
else:
|
468 |
mask2 = None
|