Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -152,7 +152,6 @@ def preprocess_image(image):
|
|
152 |
|
153 |
return transform(image).unsqueeze(0)
|
154 |
|
155 |
-
@spaces.GPU()
|
156 |
async def predict_single_dog(image):
|
157 |
"""
|
158 |
Predicts the dog breed using only the classifier.
|
@@ -185,7 +184,6 @@ async def predict_single_dog(image):
|
|
185 |
return probabilities[0], breeds[:3], relative_probs
|
186 |
|
187 |
|
188 |
-
@spaces.GPU()
|
189 |
async def detect_multiple_dogs(image, conf_threshold=0.3, iou_threshold=0.55):
|
190 |
results = model_yolo(image, conf=conf_threshold, iou=iou_threshold)[0]
|
191 |
dogs = []
|
@@ -268,7 +266,6 @@ def create_breed_comparison(breed1: str, breed2: str) -> dict:
|
|
268 |
return comparison_data
|
269 |
|
270 |
|
271 |
-
@spaces.GPU()
|
272 |
async def predict(image):
|
273 |
"""
|
274 |
Main prediction function that handles both single and multiple dog detection.
|
|
|
152 |
|
153 |
return transform(image).unsqueeze(0)
|
154 |
|
|
|
155 |
async def predict_single_dog(image):
|
156 |
"""
|
157 |
Predicts the dog breed using only the classifier.
|
|
|
184 |
return probabilities[0], breeds[:3], relative_probs
|
185 |
|
186 |
|
|
|
187 |
async def detect_multiple_dogs(image, conf_threshold=0.3, iou_threshold=0.55):
|
188 |
results = model_yolo(image, conf=conf_threshold, iou=iou_threshold)[0]
|
189 |
dogs = []
|
|
|
266 |
return comparison_data
|
267 |
|
268 |
|
|
|
269 |
async def predict(image):
|
270 |
"""
|
271 |
Main prediction function that handles both single and multiple dog detection.
|