madhavkotecha commited on
Commit
44d2df2
·
verified ·
1 Parent(s): 443264e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -17,7 +17,7 @@ processor = TrOCRProcessor.from_pretrained('microsoft/trocr-large-handwritten')
17
  trocr_model = VisionEncoderDecoderModel.from_pretrained('microsoft/trocr-large-handwritten').to(device)
18
  trocr_model.config.num_beams = 1
19
 
20
- yolo_model = YOLO(yolo_weights_path).to('mps')
21
  unmasker_large = pipeline('fill-mask', model='roberta-large', device=device)
22
  roberta_model = AutoModelForMaskedLM.from_pretrained("roberta-large").to(device)
23
 
 
17
  trocr_model = VisionEncoderDecoderModel.from_pretrained('microsoft/trocr-large-handwritten').to(device)
18
  trocr_model.config.num_beams = 1
19
 
20
+ yolo_model = YOLO(yolo_weights_path).to('cpu')
21
  unmasker_large = pipeline('fill-mask', model='roberta-large', device=device)
22
  roberta_model = AutoModelForMaskedLM.from_pretrained("roberta-large").to(device)
23