John6666 commited on
Commit
ab120f4
·
verified ·
1 Parent(s): dc4542a

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
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
- return str(detectors)
 
 
 
 
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)