Sanjayraju30 commited on
Commit
f941d9c
Β·
verified Β·
1 Parent(s): faac1d1

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +2 -2
src/streamlit_app.py CHANGED
@@ -8,7 +8,7 @@ st.title("βš–οΈ Auto Weight Logger")
8
 
9
  img_data = st.camera_input("πŸ“· Capture the weight display")
10
 
11
- if img_data:
12
  if len(img_data.getvalue()) > 5 * 1024 * 1024:
13
  st.error("❌ Image too large (>5MB). Please try again.")
14
  st.stop()
@@ -19,7 +19,7 @@ if img_data:
19
  with st.spinner("πŸ” Extracting weight..."):
20
  weight, confidence = extract_weight_from_image(image)
21
 
22
- # βœ… Show debug info (you can delete this later)
23
  st.write(f"πŸ› οΈ DEBUG: weight = {weight}, confidence = {confidence}")
24
 
25
  if not weight or confidence < 80:
 
8
 
9
  img_data = st.camera_input("πŸ“· Capture the weight display")
10
 
11
+ if img_data is not None:
12
  if len(img_data.getvalue()) > 5 * 1024 * 1024:
13
  st.error("❌ Image too large (>5MB). Please try again.")
14
  st.stop()
 
19
  with st.spinner("πŸ” Extracting weight..."):
20
  weight, confidence = extract_weight_from_image(image)
21
 
22
+ # DEBUG: This helps you test OCR output
23
  st.write(f"πŸ› οΈ DEBUG: weight = {weight}, confidence = {confidence}")
24
 
25
  if not weight or confidence < 80: