Update app.py
Browse files
app.py
CHANGED
|
@@ -4,11 +4,16 @@ import pytesseract
|
|
| 4 |
import cv2
|
| 5 |
from PIL import Image
|
| 6 |
import numpy as np
|
|
|
|
|
|
|
| 7 |
|
| 8 |
# -------------------------------------------------------------
|
| 9 |
# Load Model
|
| 10 |
# -------------------------------------------------------------
|
| 11 |
# Replace with your fine-tuned model on Hugging Face Hub
|
|
|
|
|
|
|
|
|
|
| 12 |
MODEL_ID = "google/vit-base-patch16-224-in21k"
|
| 13 |
|
| 14 |
classifier = pipeline("image-classification", model=MODEL_ID)
|
|
|
|
| 4 |
import cv2
|
| 5 |
from PIL import Image
|
| 6 |
import numpy as np
|
| 7 |
+
import pytesseract
|
| 8 |
+
|
| 9 |
|
| 10 |
# -------------------------------------------------------------
|
| 11 |
# Load Model
|
| 12 |
# -------------------------------------------------------------
|
| 13 |
# Replace with your fine-tuned model on Hugging Face Hub
|
| 14 |
+
|
| 15 |
+
pytesseract.pytesseract.tesseract_cmd = "/usr/bin/tesseract"
|
| 16 |
+
|
| 17 |
MODEL_ID = "google/vit-base-patch16-224-in21k"
|
| 18 |
|
| 19 |
classifier = pipeline("image-classification", model=MODEL_ID)
|