Spaces:
Running
Running
madhavkotecha
commited on
Update app.py
Browse files
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('
|
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 |
|