Sanjayraju30 commited on
Commit
b00d23d
Β·
verified Β·
1 Parent(s): a743f73

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: {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: {weight} g")