fix: dataclass error

This commit is contained in:
Bingsu
2023-04-26 21:42:56 +09:00
parent 68f7a6b514
commit 3d6d2c46f7

View File

@@ -1,6 +1,7 @@
from __future__ import annotations
from collections import OrderedDict
from dataclasses import dataclass
from pathlib import Path
from typing import Optional
@@ -8,7 +9,6 @@ import cv2
import numpy as np
from huggingface_hub import hf_hub_download
from PIL import Image, ImageChops, ImageDraw
from pydantic.dataclasses import dataclass
@dataclass
@@ -17,9 +17,6 @@ class PredictOutput:
masks: Optional[list[Image.Image]] = None
preview: Optional[Image.Image] = None
class Config:
arbitrary_types_allowed = True
def get_models(model_dir: str | Path) -> OrderedDict[str, str | None]:
model_dir = Path(model_dir)