Spaces:
Sleeping
Sleeping
File size: 804 Bytes
6aba0d7 |
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 27 28 29 30 31 |
import streamlit as st
from PIL import Image
st.title("Image to Text Converter")
uploaded_image = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
if uploaded_image is not None:
# Display the uploaded image
image = Image.open(uploaded_image)
st.image(image, caption='Uploaded Image.', use_column_width=True)
# Extract text from the image
st.write("Extracting text from the image...")
# Display the extracted text
st.text_area("Extracted Text", "desc", height=200)
# Instructions for Tesseract OCR
st.sidebar.title("Instructions")
st.sidebar.write(
"""
1. Upload an image using the file uploader.
2. Wait for the app to process and extract text from the image.
3. The extracted text will be displayed in the text area.
"""
)
|