Update app.py
Browse files
app.py
CHANGED
@@ -44,10 +44,13 @@ if st.sidebar.button("Process Image"):
|
|
44 |
line_mask = process_lines(temp_file_path)
|
45 |
text_extracted=detect_text(temp_file_path)
|
46 |
|
|
|
|
|
|
|
47 |
st.subheader("Line Mask")
|
48 |
st.image(line_mask, channels="GRAY")
|
49 |
|
50 |
-
st.subheader("Text
|
51 |
st.image(cv2.cvtColor(text_extracted, cv2.COLOR_BGR2RGB))
|
52 |
else:
|
53 |
st.sidebar.error("Please upload an image file before clicking 'Process Image'.")
|
|
|
44 |
line_mask = process_lines(temp_file_path)
|
45 |
text_extracted=detect_text(temp_file_path)
|
46 |
|
47 |
+
st.subheader("Original image")
|
48 |
+
st.image(uploaded_file)
|
49 |
+
|
50 |
st.subheader("Line Mask")
|
51 |
st.image(line_mask, channels="GRAY")
|
52 |
|
53 |
+
st.subheader("Text Detected")
|
54 |
st.image(cv2.cvtColor(text_extracted, cv2.COLOR_BGR2RGB))
|
55 |
else:
|
56 |
st.sidebar.error("Please upload an image file before clicking 'Process Image'.")
|