Spaces:
Running on Zero
Running on Zero
Upload 60 files
Browse files- .github/workflows/test.yml +4 -1
- README.md +1 -1
- config.py +1 -2
- pyproject.toml +1 -2
.github/workflows/test.yml
CHANGED
|
@@ -8,11 +8,14 @@ on:
|
|
| 8 |
jobs:
|
| 9 |
unit:
|
| 10 |
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
|
|
| 11 |
steps:
|
| 12 |
- uses: actions/checkout@v4
|
| 13 |
- uses: actions/setup-python@v5
|
| 14 |
with:
|
| 15 |
-
python-version:
|
| 16 |
cache: pip
|
| 17 |
- run: python -m pip install -r requirements-test.txt
|
| 18 |
- run: python -m compileall -q .
|
|
|
|
| 8 |
jobs:
|
| 9 |
unit:
|
| 10 |
runs-on: ubuntu-latest
|
| 11 |
+
strategy:
|
| 12 |
+
matrix:
|
| 13 |
+
python-version: ["3.10", "3.11"]
|
| 14 |
steps:
|
| 15 |
- uses: actions/checkout@v4
|
| 16 |
- uses: actions/setup-python@v5
|
| 17 |
with:
|
| 18 |
+
python-version: ${{ matrix.python-version }}
|
| 19 |
cache: pip
|
| 20 |
- run: python -m pip install -r requirements-test.txt
|
| 21 |
- run: python -m compileall -q .
|
README.md
CHANGED
|
@@ -5,7 +5,7 @@ colorFrom: indigo
|
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 6.20.0
|
| 8 |
-
python_version: 3.11
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
---
|
|
|
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 6.20.0
|
| 8 |
+
python_version: "3.11"
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
---
|
config.py
CHANGED
|
@@ -4,7 +4,6 @@ from __future__ import annotations
|
|
| 4 |
|
| 5 |
from functools import lru_cache
|
| 6 |
from pathlib import Path
|
| 7 |
-
from typing import Self
|
| 8 |
|
| 9 |
from pydantic import Field, field_validator, model_validator
|
| 10 |
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
@@ -107,7 +106,7 @@ class Settings(BaseSettings):
|
|
| 107 |
return cleaned or None
|
| 108 |
|
| 109 |
@model_validator(mode="after")
|
| 110 |
-
def validate_model_shapes(self) ->
|
| 111 |
if self.image_width % 8 or self.image_height % 8:
|
| 112 |
raise ValueError("IMAGE_WIDTH and IMAGE_HEIGHT must be multiples of 8")
|
| 113 |
if (self.video_frames - 1) % 4:
|
|
|
|
| 4 |
|
| 5 |
from functools import lru_cache
|
| 6 |
from pathlib import Path
|
|
|
|
| 7 |
|
| 8 |
from pydantic import Field, field_validator, model_validator
|
| 9 |
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
| 106 |
return cleaned or None
|
| 107 |
|
| 108 |
@model_validator(mode="after")
|
| 109 |
+
def validate_model_shapes(self) -> Settings:
|
| 110 |
if self.image_width % 8 or self.image_height % 8:
|
| 111 |
raise ValueError("IMAGE_WIDTH and IMAGE_HEIGHT must be multiples of 8")
|
| 112 |
if (self.video_frames - 1) % 4:
|
pyproject.toml
CHANGED
|
@@ -3,10 +3,9 @@ asyncio_mode = "auto"
|
|
| 3 |
testpaths = ["tests"]
|
| 4 |
|
| 5 |
[tool.ruff]
|
| 6 |
-
target-version = "
|
| 7 |
line-length = 100
|
| 8 |
|
| 9 |
[tool.ruff.lint]
|
| 10 |
select = ["E", "F", "I", "B", "UP"]
|
| 11 |
ignore = ["B008"]
|
| 12 |
-
|
|
|
|
| 3 |
testpaths = ["tests"]
|
| 4 |
|
| 5 |
[tool.ruff]
|
| 6 |
+
target-version = "py310"
|
| 7 |
line-length = 100
|
| 8 |
|
| 9 |
[tool.ruff.lint]
|
| 10 |
select = ["E", "F", "I", "B", "UP"]
|
| 11 |
ignore = ["B008"]
|
|
|