Spaces:
Sleeping
Sleeping
Chnages
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ import os
|
|
| 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/
|
| 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/TC-OCR-Custom").to(device)
|
| 15 |
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-large-handwritten")
|
| 16 |
|
| 17 |
def ocr_image(image):
|