MedGen-AI / app.py
Hasnain-Ali's picture
Update app.py
40ab83f verified
raw
history blame
440 Bytes
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