Spaces:
Sleeping
Sleeping
Update src/htr_pipeline/inferencer.py
Browse files
src/htr_pipeline/inferencer.py
CHANGED
@@ -120,7 +120,7 @@ class Inferencer:
|
|
120 |
|
121 |
@timer_func
|
122 |
def transcribe_different_model(self, image, htr_tool_transcriber_model_dropdown):
|
123 |
-
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
124 |
|
125 |
if htr_tool_transcriber_model_dropdown == "pstroe/bullinger-general-model":
|
126 |
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-base-handwritten")
|
|
|
120 |
|
121 |
@timer_func
|
122 |
def transcribe_different_model(self, image, htr_tool_transcriber_model_dropdown):
|
123 |
+
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
124 |
|
125 |
if htr_tool_transcriber_model_dropdown == "pstroe/bullinger-general-model":
|
126 |
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-base-handwritten")
|