Spaces:
Sleeping
Sleeping
rmayormartins
commited on
Commit
·
cd1c9b1
1
Parent(s):
3137f44
Subindo arquivos3
Browse files- app.py +2 -2
- requirements.txt +1 -3
app.py
CHANGED
@@ -4,7 +4,7 @@ from PIL import Image
|
|
4 |
import torch
|
5 |
import matplotlib.pyplot as plt
|
6 |
|
7 |
-
#
|
8 |
model = torch.hub.load('ultralytics/yolov5', 'custom', path='bestyolo5.pt')
|
9 |
|
10 |
def detect(img):
|
@@ -31,7 +31,7 @@ def detect(img):
|
|
31 |
|
32 |
return pil_img, cattle_count
|
33 |
|
34 |
-
#
|
35 |
iface = gr.Interface(
|
36 |
fn=detect,
|
37 |
inputs=gr.Image(type="pil"),
|
|
|
4 |
import torch
|
5 |
import matplotlib.pyplot as plt
|
6 |
|
7 |
+
# Modelo
|
8 |
model = torch.hub.load('ultralytics/yolov5', 'custom', path='bestyolo5.pt')
|
9 |
|
10 |
def detect(img):
|
|
|
31 |
|
32 |
return pil_img, cattle_count
|
33 |
|
34 |
+
# Gradio
|
35 |
iface = gr.Interface(
|
36 |
fn=detect,
|
37 |
inputs=gr.Image(type="pil"),
|
requirements.txt
CHANGED
@@ -3,6 +3,4 @@ numpy
|
|
3 |
Pillow
|
4 |
torch
|
5 |
matplotlib
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
3 |
Pillow
|
4 |
torch
|
5 |
matplotlib
|
6 |
+
opencv-python
|
|
|
|