Spaces:
Sleeping
Sleeping
File size: 676 Bytes
93e9c80 c9fc81b 93e9c80 c9fc81b b1b27e7 55c4146 39b00d3 93e9c80 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import streamlit as st
from PIL import Image
import pytesseract
st.set_page_config(page_title="Image to Text OCR", layout="centered")
st.title("๐ผ๏ธ Image to Text OCR")
st.write("Upload an image, and we'll extract the text for you using Tesseract OCR.")
uploaded_file = st.file_uploader("Choose an image...", type=["png", "jpg", "jpeg"])
if uploaded_file is not None:
image = Image.open(uploaded_file)
st.image(image, caption="Uploaded Image", use_column_width=True)
with st.spinner("Extracting text..."):
text = pytesseract.image_to_string(image)
st.subheader("๐ Extracted Text:")
st.text_area("OCR Output", text, height=300)
|