Spaces:
Sleeping
Sleeping
import pytesseract | |
import subprocess | |
import streamlit as st | |
# Check if Tesseract is installed | |
tesseract_path = subprocess.run(["which", "tesseract"], capture_output=True, text=True).stdout.strip() | |
if not tesseract_path: | |
st.error("Tesseract is not installed. Make sure 'apt.txt' contains 'tesseract-ocr'.") | |
else: | |
st.success(f"Tesseract is installed at: {tesseract_path}") | |
pytesseract.pytesseract.tesseract_cmd = tesseract_path | |