summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-10-27 22:12:36 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-10-27 22:12:36 +0200
commit8c7a59d58e2ce6b18384c9fcdba2fd49e5450b0e (patch)
treed67f27b8d83c0acca6c2e7e0713b9a5df5bae598
parent2e7d569cede02667f1eabe4d32a2ed97f565c515 (diff)
Fix imports in transformer model
-rw-r--r--text_recognizer/models/transformer.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/text_recognizer/models/transformer.py b/text_recognizer/models/transformer.py
index 50bf73d..d8cb665 100644
--- a/text_recognizer/models/transformer.py
+++ b/text_recognizer/models/transformer.py
@@ -1,12 +1,12 @@
"""PyTorch Lightning model for base Transformers."""
-from typing import Tuple, Type, Set
+from typing import Set, Tuple
import attr
import torch
from torch import Tensor
-from text_recognizer.models.metrics import CharacterErrorRate
from text_recognizer.models.base import BaseLitModel
+from text_recognizer.models.metrics import CharacterErrorRate
@attr.s(auto_attribs=True, eq=False)
@@ -76,7 +76,7 @@ class TransformerLitModel(BaseLitModel):
def predict(self, x: Tensor) -> Tensor:
"""Predicts text in image.
-
+
Args:
x (Tensor): Image(s) to extract text from.