File size: 516 Bytes
a1404b6
3af45a2
d91b12e
a339abc
0e256ab
5ffb360
d91b12e
 
ed6dff3
d91b12e
6aa6eed
ce358bf
34705d2
 
 
 
d91b12e
34705d2
 
d91b12e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import cv2
import streamlit as st
from fastai.vision.all import *
st.markdown('<h1 style="color:black;">BDI Image classification model</h1>', 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)