Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ image_processor = AutoImageProcessor.from_pretrained('hustvl/yolos-small')
|
|
6 |
model = AutoModelForObjectDetection.from_pretrained('hustvl/yolos-small')
|
7 |
|
8 |
def detect(image):
|
9 |
-
inputs =
|
10 |
outputs = model(**inputs)
|
11 |
|
12 |
# convert outputs to COCO API
|
|
|
6 |
model = AutoModelForObjectDetection.from_pretrained('hustvl/yolos-small')
|
7 |
|
8 |
def detect(image):
|
9 |
+
inputs = image_processor(images=image, return_tensors="pt")
|
10 |
outputs = model(**inputs)
|
11 |
|
12 |
# convert outputs to COCO API
|