farkmu45 commited on
Commit
eba7ca5
1 Parent(s): ac7cc49

Use List for typing

Browse files
Files changed (1) hide show
  1. Processor.py +2 -1
Processor.py CHANGED
@@ -2,6 +2,7 @@ import PIL.Image as Image
2
  import torch
3
  from fastai.vision.all import Learner
4
  from numpy.typing import NDArray
 
5
 
6
  class Processor():
7
  def __init__(self, learn: Learner):
@@ -9,7 +10,7 @@ class Processor():
9
  self.__model = torch.hub.load(
10
  'ultralytics/yolov5', 'yolov5x6', trust_repo=True)
11
 
12
- def classify_images(self, images: list[NDArray]) -> list[str]:
13
  result = []
14
  class_names = self.__inference.dls.vocab
15
 
 
2
  import torch
3
  from fastai.vision.all import Learner
4
  from numpy.typing import NDArray
5
+ from typing import List
6
 
7
  class Processor():
8
  def __init__(self, learn: Learner):
 
10
  self.__model = torch.hub.load(
11
  'ultralytics/yolov5', 'yolov5x6', trust_repo=True)
12
 
13
+ def classify_images(self, images: List[NDArray]) -> List[str]:
14
  result = []
15
  class_names = self.__inference.dls.vocab
16