Sanjayraju30 commited on
Commit
5440cfa
·
verified ·
1 Parent(s): 8ef82a5

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +6 -6
src/streamlit_app.py CHANGED
@@ -9,9 +9,9 @@ st.title("⚖️ Auto Weight Logger")
9
  img_data = st.camera_input("📷 Capture the weight display")
10
 
11
  if img_data:
12
- with tempfile.NamedTemporaryFile(delete=False, suffix=".jpg") as f:
13
- f.write(img_data.getvalue())
14
- f.flush()
15
- weight = extract_weight(f.name)
16
- st.image(f.name, caption="📸 Snapshot")
17
- st.success(f"✅ Detected Weight: " + str(weight) + " g")
 
9
  img_data = st.camera_input("📷 Capture the weight display")
10
 
11
  if img_data:
12
+ with tempfile.NamedTemporaryFile(delete=False, suffix=".jpg") as f:
13
+ f.write(img_data.getvalue())
14
+ f.flush()
15
+ weight = extract_weight(f.name)
16
+ st.image(f.name, caption="📸 Snapshot")
17
+ st.success(f"✅ Detected Weight: " + str(weight) + " g")