Spaces:
Running
on
T4
Running
on
T4
Update src/htr_pipeline/models.py
Browse files
src/htr_pipeline/models.py
CHANGED
@@ -10,7 +10,7 @@ from mmocr.apis import TextRecInferencer
|
|
10 |
|
11 |
class HtrModels:
|
12 |
def __init__(self, local_run=False):
|
13 |
-
self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
14 |
|
15 |
model_folder = "./models"
|
16 |
self.region_config = f"{model_folder}/RmtDet_regions/rtmdet_m_textregions_2_concat.py"
|
|
|
10 |
|
11 |
class HtrModels:
|
12 |
def __init__(self, local_run=False):
|
13 |
+
self.device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
14 |
|
15 |
model_folder = "./models"
|
16 |
self.region_config = f"{model_folder}/RmtDet_regions/rtmdet_m_textregions_2_concat.py"
|