dcorcoran commited on
Commit
e11f0c7
·
1 Parent(s): f965aa3

Added OCR region drawing tab to visualize what the OCR is looking at

Browse files
Files changed (2) hide show
  1. app/main.py +11 -0
  2. app/services/ocr_service.py +1 -1
app/main.py CHANGED
@@ -121,3 +121,14 @@ import uvicorn
121
  if __name__ == "__main__":
122
  uvicorn.run("app.main:app", host="0.0.0.0", port=7860)
123
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  if __name__ == "__main__":
122
  uvicorn.run("app.main:app", host="0.0.0.0", port=7860)
123
 
124
+
125
+
126
+ """
127
+ ENDPOINT LOCATIONS:
128
+ https://dcorcoran-pokemon-card-image-processor-api.hf.space/docs
129
+ https://dcorcoran-pokemon-card-image-processor-api.hf.space/health
130
+ https://dcorcoran-pokemon-card-image-processor-api.hf.space/predict
131
+ https://dcorcoran-pokemon-card-image-processor-api.hf.space/cards
132
+ https://dcorcoran-pokemon-card-image-processor-api.hf.space/visualize
133
+
134
+ """
app/services/ocr_service.py CHANGED
@@ -9,7 +9,7 @@ import os
9
  class OCRService:
10
 
11
  def __init__(self):
12
- # Check if tessaract lives as an environemtn variable
13
  if sys.platform.startswith("win"):
14
  pytesseract.pytesseract.tesseract_cmd = os.getenv("TESSERACT_PATH", "C:/Program Files/Tesseract-OCR/tesseract.exe")
15
 
 
9
  class OCRService:
10
 
11
  def __init__(self):
12
+ # On Windows, use the TESSERACT_PATH env var if set, otherwise fall back to the default installation path
13
  if sys.platform.startswith("win"):
14
  pytesseract.pytesseract.tesseract_cmd = os.getenv("TESSERACT_PATH", "C:/Program Files/Tesseract-OCR/tesseract.exe")
15