diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3568876..7e676ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 81eb2ee..caf8211 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -20,7 +20,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: 3.12 - name: Setup uv diff --git a/yolo11n/predict.py b/yolo11n/predict.py index ad27f4d..3dc368c 100644 --- a/yolo11n/predict.py +++ b/yolo11n/predict.py @@ -1,6 +1,6 @@ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license -from typing import Optional +from __future__ import annotations from cog import BaseModel, BasePredictor, Input, Path from ultralytics import YOLO @@ -9,8 +9,8 @@ class Output(BaseModel): """Output model for predictions.""" - image: Optional[Path] = None - json_str: Optional[str] = None + image: Path | None = None + json_str: str | None = None class Predictor(BasePredictor): diff --git a/yoloe11s/predict.py b/yoloe11s/predict.py index 85c2532..94c8dd3 100644 --- a/yoloe11s/predict.py +++ b/yoloe11s/predict.py @@ -1,6 +1,6 @@ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license -from typing import Optional +from __future__ import annotations from cog import BaseModel, BasePredictor, Input, Path from ultralytics import YOLOE @@ -9,8 +9,8 @@ class Output(BaseModel): """Output model for predictions.""" - image: Optional[Path] = None - json_str: Optional[str] = None + image: Path | None = None + json_str: str | None = None class Predictor(BasePredictor): diff --git a/yolov8s-worldv2/predict.py b/yolov8s-worldv2/predict.py index 3288bb8..7933193 100644 --- a/yolov8s-worldv2/predict.py +++ b/yolov8s-worldv2/predict.py @@ -1,6 +1,6 @@ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license -from typing import Optional +from __future__ import annotations from cog import BaseModel, BasePredictor, Input, Path from ultralytics import YOLOWorld @@ -9,8 +9,8 @@ class Output(BaseModel): """Output model for predictions.""" - image: Optional[Path] = None - json_str: Optional[str] = None + image: Path | None = None + json_str: str | None = None class Predictor(BasePredictor):