Update app.py
Browse files
app.py
CHANGED
@@ -78,15 +78,15 @@ def main():
|
|
78 |
if st.sidebar.button("Analyze image"):
|
79 |
|
80 |
if uploaded_file is None:
|
81 |
-
st.sidebar.write("Please upload
|
82 |
|
83 |
else:
|
84 |
with st.spinner('Loading model...'):
|
85 |
if det_arch == 'pytesseract':
|
86 |
-
predictor = pytesseract.image_to_string(
|
87 |
else:
|
88 |
reader = easyocr.Reader(['en'])
|
89 |
-
predictor = reader.readtext(
|
90 |
with st.spinner('Analyzing...'):
|
91 |
|
92 |
# Plot OCR output
|
|
|
78 |
if st.sidebar.button("Analyze image"):
|
79 |
|
80 |
if uploaded_file is None:
|
81 |
+
st.sidebar.write("Please upload an image")
|
82 |
|
83 |
else:
|
84 |
with st.spinner('Loading model...'):
|
85 |
if det_arch == 'pytesseract':
|
86 |
+
predictor = pytesseract.image_to_string(doc)
|
87 |
else:
|
88 |
reader = easyocr.Reader(['en'])
|
89 |
+
predictor = reader.readtext(doc, detail = 0)
|
90 |
with st.spinner('Analyzing...'):
|
91 |
|
92 |
# Plot OCR output
|