Commit ab71705f authored by narugo1992's avatar narugo1992
Browse files

dev(narugo): fix bug for python3.7

parent a80fb50b
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@ Overview:
        your image source or preprocess them using SCUNet.
"""
from functools import lru_cache
from typing import Literal

import numpy as np
from PIL import Image
@@ -25,6 +24,11 @@ from huggingface_hub import hf_hub_download
from ..data import ImageTyping, load_image
from ..utils import open_onnx_model, area_batch_run

try:
    from typing import Literal
except (ImportError, ModuleNotFoundError):
    from typing_extensions import Literal

NafNetModelTyping = Literal['REDS', 'GoPro', 'SIDD']


+5 −1
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@ Overview:

"""
from functools import lru_cache
from typing import Literal

import numpy as np
from PIL import Image
@@ -21,6 +20,11 @@ from huggingface_hub import hf_hub_download
from ..data import ImageTyping, load_image
from ..utils import open_onnx_model, area_batch_run

try:
    from typing import Literal
except (ImportError, ModuleNotFoundError):
    from typing_extensions import Literal

SCUNetModelTyping = Literal['GAN', 'PSNR']