Spaces:
Sleeping
Sleeping
File size: 530 Bytes
fb1a823 c41b38b fb1a823 7aa5221 00286f9 fb1a823 216f81d aba4a6b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import streamlit as st
from PIL import Image
from ocr_engine import extract_weight_from_image
st.set_page_config(page_title="Auto Weight Logger", layout="centered")
st.title("βοΈ Auto Weight Logger")
img_data = st.camera_input("π· Capture the weight display")
if img_data:
image = Image.open(img_data)
st.image(image, caption="πΈ Snapshot", use_column_width=True)
with st.spinner("Extracting weight..."):
weight = extract_weight_from_image(image)
st.success(f"β
Detected Weight: {weight} g")
|