Scezui commited on
Commit
b05d188
1 Parent(s): 14e1987

Update Layoutlmv3_inference/ocr.py

Browse files
Files changed (1) hide show
  1. Layoutlmv3_inference/ocr.py +2 -1
Layoutlmv3_inference/ocr.py CHANGED
@@ -92,7 +92,8 @@ def run_tesseract_on_preprocessed_image(preprocessed_image, image_path):
92
  url = "https://api.ocr.space/parse/image"
93
 
94
  # Define the API key and the language
95
- api_key = "K88232854988957" # Replace with your actual OCR Space API key
 
96
  language = "eng"
97
 
98
  # Save the preprocessed image
 
92
  url = "https://api.ocr.space/parse/image"
93
 
94
  # Define the API key and the language
95
+ # api_key = "K88232854988957" # Replace with your actual OCR Space API key
96
+ api_key = os.getenv("ocr_space")
97
  language = "eng"
98
 
99
  # Save the preprocessed image