rosebe commited on
Commit
0c4cdbf
·
1 Parent(s): 4538247

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  import torch
3
 
4
  model = torch.hub.load('ultralytics/yolov5', 'custom', path='best.pt')
5
- # Define the face detector function
6
  def detect_faces(image):
7
  # Loading in yolov5s - you can switch to larger models such as yolov5m or yolov5l, or smaller such as yolov5n
8
  results = model(image)
@@ -12,5 +12,5 @@ def detect_faces(image):
12
  # Create a Gradio interface
13
  iface = gr.Interface(fn=detect_faces, inputs=gr.Image(source="webcam", tool =None), outputs="image")
14
 
15
- # Launch the interface
16
  iface.launch(debug=True)
 
2
  import torch
3
 
4
  model = torch.hub.load('ultralytics/yolov5', 'custom', path='best.pt')
5
+ # Define the face detector function
6
  def detect_faces(image):
7
  # Loading in yolov5s - you can switch to larger models such as yolov5m or yolov5l, or smaller such as yolov5n
8
  results = model(image)
 
12
  # Create a Gradio interface
13
  iface = gr.Interface(fn=detect_faces, inputs=gr.Image(source="webcam", tool =None), outputs="image")
14
 
15
+ # Launch the interface
16
  iface.launch(debug=True)