Update app.py
Browse files
app.py
CHANGED
@@ -452,8 +452,9 @@ with tab_ocr:
|
|
452 |
entry = f"OCR Test: {selected_file} -> {output_file}"
|
453 |
st.session_state['history'].append(entry)
|
454 |
st.text_area("OCR Result", result, height=200, key="ocr_result")
|
455 |
-
if len(result) > 50 and (with open(output_file, "w") as f: f.write(result)): st.success(f"OCR output saved to {output_file}") else st.warning("OCR output too short; file not saved.")
|
456 |
|
|
|
|
|
457 |
#st.success(f"OCR output saved to {output_file}")
|
458 |
st.session_state['processing']['ocr'] = False
|
459 |
if selected_file.endswith('.pdf') and st.button("OCR All Pages 🚀", key="ocr_all_pages"):
|
|
|
452 |
entry = f"OCR Test: {selected_file} -> {output_file}"
|
453 |
st.session_state['history'].append(entry)
|
454 |
st.text_area("OCR Result", result, height=200, key="ocr_result")
|
|
|
455 |
|
456 |
+
st.success(f"OCR output saved to {output_file}") if len(result) > 50 and open(output_file, "w").write(result) else st.warning("OCR output too short; file not saved.")
|
457 |
+
|
458 |
#st.success(f"OCR output saved to {output_file}")
|
459 |
st.session_state['processing']['ocr'] = False
|
460 |
if selected_file.endswith('.pdf') and st.button("OCR All Pages 🚀", key="ocr_all_pages"):
|