Upload app.py
Browse files
app.py
CHANGED
|
@@ -90,7 +90,11 @@ def infer(text: str):
|
|
| 90 |
person_model_path = hf_hub_download("Bingsu/adetailer", "person_yolov8s-seg.pt")
|
| 91 |
person_detector = partial(yolo_detector, model_path=person_model_path)
|
| 92 |
detectors.append(person_detector)
|
| 93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
|
| 95 |
with gr.Blocks() as demo:
|
| 96 |
input_text= gr.Textbox(label="Input", value="", show_copy_button=True)
|
|
|
|
| 90 |
person_model_path = hf_hub_download("Bingsu/adetailer", "person_yolov8s-seg.pt")
|
| 91 |
person_detector = partial(yolo_detector, model_path=person_model_path)
|
| 92 |
detectors.append(person_detector)
|
| 93 |
+
|
| 94 |
+
init_image = Image.open("./image.webp")
|
| 95 |
+
for j, detector in enumerate(detectors):
|
| 96 |
+
masks = detector(init_image)
|
| 97 |
+
return str(masks)
|
| 98 |
|
| 99 |
with gr.Blocks() as demo:
|
| 100 |
input_text= gr.Textbox(label="Input", value="", show_copy_button=True)
|