import cv2 import streamlit as st from fastai.vision.all import * st.markdown('

BDI Image classification model

', unsafe_allow_html=True) learn = load_learner('export (5).pkl') upload = st.file_uploader('Insert image for classification', type=['png','jpg']) c1, c2= st.columns(2) if upload is not None: im= Image.open(upload) c1.header('Input Image') c1.image(im) pred, idx, probs = learn.predict(im) c2.header('Output') c2.subheader('Predicted class :') c2.write(pred)