File size: 628 Bytes
59692c9
 
 
 
 
 
 
 
 
e2578ac
59692c9
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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()