Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +7 -5
src/streamlit_app.py
CHANGED
@@ -8,8 +8,10 @@ st.title("βοΈ Auto Weight Logger")
|
|
8 |
img_data = st.camera_input("π· Capture the weight display")
|
9 |
|
10 |
if img_data:
|
11 |
-
image = Image.open(img_data)
|
12 |
-
st.image(image, caption="πΈ Snapshot", use_column_width=True)
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
|
|
|
8 |
img_data = st.camera_input("π· Capture the weight display")
|
9 |
|
10 |
if img_data:
|
11 |
+
image = Image.open(img_data)
|
12 |
+
st.image(image, caption="πΈ Snapshot", use_column_width=True)
|
13 |
+
|
14 |
+
with st.spinner("Extracting weight..."):
|
15 |
+
weight = extract_weight_from_image(image)
|
16 |
+
|
17 |
+
st.success(f"β
Detected Weight: {weight} g")
|