AeternumS commited on
Commit
44ee111
·
1 Parent(s): cb4d28e
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -83,6 +83,10 @@ if st.button("Submit"):
83
  for uploaded_image in uploaded_images:
84
  with st.spinner(f"Extracting text from image: {uploaded_image.name}..."):
85
  image = Image.open(uploaded_image)
 
 
 
 
86
  extracted_text = extract_text_from_image(image)
87
  st.text_area(f"Extracted Text from {uploaded_image.name}", value=extracted_text, height=200)
88
 
@@ -105,4 +109,4 @@ if st.button("Submit"):
105
  st.write("All extracted JSON Data:")
106
  st.json(all_json_data) # Display all extracted JSON data together
107
  else:
108
- st.warning("Please upload at least one image to extract text.")
 
83
  for uploaded_image in uploaded_images:
84
  with st.spinner(f"Extracting text from image: {uploaded_image.name}..."):
85
  image = Image.open(uploaded_image)
86
+
87
+ # Display the uploaded image
88
+ st.image(image, caption=f"Uploaded Image: {uploaded_image.name}", use_column_width=True)
89
+
90
  extracted_text = extract_text_from_image(image)
91
  st.text_area(f"Extracted Text from {uploaded_image.name}", value=extracted_text, height=200)
92
 
 
109
  st.write("All extracted JSON Data:")
110
  st.json(all_json_data) # Display all extracted JSON data together
111
  else:
112
+ st.warning("Please upload at least one image to extract text.")