ResNetYoloV1 / app.py
akriel
renamed title
e2578ac
raw
history blame contribute delete
628 Bytes
import streamlit as st
from PIL import Image
from vision_models_playground.utility.hub import load_vmp_pipeline_from_hub
pipeline = load_vmp_pipeline_from_hub("Akriel/ResNetYoloV1")
def interface():
st.title("ResNetYoloV1 Object Detection")
uploaded_image = st.file_uploader("Upload an image", type=["jpg", "jpeg", "png"])
if uploaded_image is not None:
image = Image.open(uploaded_image)
results = pipeline(image)[0]
image_with_bboxes = results['image']
st.image(image_with_bboxes, caption="Uploaded Image", use_column_width=True)
if __name__ == "__main__":
interface()