LBLong commited on
Commit
c3b866d
·
verified ·
1 Parent(s): 21bd444

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -5,9 +5,7 @@ import cv2
5
  import gradio as gr
6
  from PIL import Image
7
  import numpy as np
8
- from transformers import pipeline
9
 
10
- #pipe = pipeline("image-classification", model="NTQAI/pedestrian_gender_recognition")
11
  model_path = hf_hub_download(repo_id="arnabdhar/YOLOv8-Face-Detection", filename="model.pt")
12
  model = YOLO(model_path)
13
 
@@ -26,9 +24,7 @@ def detect_faces(image):
26
  for (x, y, w, h) in faces:
27
  cv2.rectangle(image_np, (x, y), (x+w, y+h), (0, 255, 0), 2)
28
 
29
- #label_out = pipe(image)
30
-
31
- return (image_np,im)#,label_out[0]['label'])
32
 
33
  interface = gr.Interface(
34
  fn=detect_faces,
 
5
  import gradio as gr
6
  from PIL import Image
7
  import numpy as np
 
8
 
 
9
  model_path = hf_hub_download(repo_id="arnabdhar/YOLOv8-Face-Detection", filename="model.pt")
10
  model = YOLO(model_path)
11
 
 
24
  for (x, y, w, h) in faces:
25
  cv2.rectangle(image_np, (x, y), (x+w, y+h), (0, 255, 0), 2)
26
 
27
+ return (image_np,im)
 
 
28
 
29
  interface = gr.Interface(
30
  fn=detect_faces,