Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -271,17 +271,6 @@ Please refer to the AKC's terms of use and privacy policy.*
|
|
271 |
"""
|
272 |
return formatted_description
|
273 |
|
274 |
-
# 全局變量,用於存儲加載的模型
|
275 |
-
model = None
|
276 |
-
model_yolo = None
|
277 |
-
|
278 |
-
def load_models():
|
279 |
-
global model, model_yolo
|
280 |
-
model = # 加載您的品種分類模型
|
281 |
-
model_yolo = YOLO('yolov8n.pt')
|
282 |
-
|
283 |
-
# 在應用啟動時加載模型
|
284 |
-
load_models()
|
285 |
|
286 |
async def predict_single_dog(image):
|
287 |
image_tensor = preprocess_image(image)
|
|
|
271 |
"""
|
272 |
return formatted_description
|
273 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
274 |
|
275 |
async def predict_single_dog(image):
|
276 |
image_tensor = preprocess_image(image)
|