Spaces:
Sleeping
Sleeping
Chnages to APP
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ checkpoint_folder = hf_hub_download(repo_id="Heramb26/tr-ocr-custom-checkpoints"
|
|
11 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
12 |
|
13 |
# Load the fine-tuned model and processor from the downloaded folder
|
14 |
-
model = VisionEncoderDecoderModel.from_pretrained(
|
15 |
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-large-handwritten")
|
16 |
|
17 |
def ocr_image(image):
|
|
|
11 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
12 |
|
13 |
# Load the fine-tuned model and processor from the downloaded folder
|
14 |
+
model = VisionEncoderDecoderModel.from_pretrained("Heramb26/tr-ocr-custom-checkpoints/checkpoint-2070").to(device)
|
15 |
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-large-handwritten")
|
16 |
|
17 |
def ocr_image(image):
|