Bhuvi13 commited on
Commit
392ea1e
·
verified ·
1 Parent(s): 0f5e41a

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +4 -4
src/streamlit_app.py CHANGED
@@ -180,7 +180,7 @@ def perform_ocr(image, bbox):
180
  except Exception as e:
181
  return f"OCR Error: {str(e)}"
182
 
183
- def scale_image_to_fixed_size(image, max_width=700, max_height=900):
184
  """Scale image to fit within max dimensions while maintaining aspect ratio - NO PADDING"""
185
  # Convert to RGB with proper handling
186
  if image.mode not in ('RGB', 'RGBA'):
@@ -533,11 +533,11 @@ elif st.session_state.page == 'viewer':
533
  # Safe access to the current record
534
  current_record = st.session_state.edited_data[selected_file]
535
 
536
- left_col, right_col = st.columns([1.8, 1.1], gap="small")
537
 
538
  # LEFT SIDE: Image Display with OCR Canvas
539
  with left_col:
540
- with st.container(height=700, border=True):
541
  file_name = current_record.get('file_name', '')
542
 
543
  if file_name:
@@ -696,7 +696,7 @@ elif st.session_state.page == 'viewer':
696
 
697
  # RIGHT SIDE: Editable Details
698
  with right_col:
699
- with st.container(height=700, border=True):
700
  st.markdown("### 📝 Document Details")
701
 
702
  gt_parse = st.session_state.edited_data[selected_file].get('gt_parse', {})
 
180
  except Exception as e:
181
  return f"OCR Error: {str(e)}"
182
 
183
+ def scale_image_to_fixed_size(image, max_width=800, max_height=1000):
184
  """Scale image to fit within max dimensions while maintaining aspect ratio - NO PADDING"""
185
  # Convert to RGB with proper handling
186
  if image.mode not in ('RGB', 'RGBA'):
 
533
  # Safe access to the current record
534
  current_record = st.session_state.edited_data[selected_file]
535
 
536
+ left_col, right_col = st.columns([1.6, 1.0], gap="small")
537
 
538
  # LEFT SIDE: Image Display with OCR Canvas
539
  with left_col:
540
+ with st.container(height=700, border=False):
541
  file_name = current_record.get('file_name', '')
542
 
543
  if file_name:
 
696
 
697
  # RIGHT SIDE: Editable Details
698
  with right_col:
699
+ with st.container(height=700, border=False):
700
  st.markdown("### 📝 Document Details")
701
 
702
  gt_parse = st.session_state.edited_data[selected_file].get('gt_parse', {})