smishr-18's picture
Upload 4 files
fd2c31d
raw
history blame
480 Bytes
import streamlit as st
import cv2
from llm import llm
import numpy as np
image = st.file_uploader("Choose a clear image of the Neutrition Facts", type=["jpg", "jpeg", "png"])
# Display the uploaded image
if image is not None:
image = np.asarray(bytearray(image.read()), dtype=np.uint8)
# Read the image using OpenCV
img = cv2.imdecode(image, cv2.IMREAD_COLOR)
st.image(img, caption="Uploaded Image.", use_column_width=True)
st.markdown(llm(img))