Gabriel commited on
Commit
52b2b0b
1 Parent(s): 9429105

Update src/htr_pipeline/inferencer.py

Browse files
Files changed (1) hide show
  1. src/htr_pipeline/inferencer.py +1 -1
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")