Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- 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")
|