abcdef12356 commited on
Commit
4a72c7a
·
1 Parent(s): adf7a37

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -2,6 +2,18 @@ import cv2
2
  import streamlit as st
3
  from fastai.vision.all import *
4
  import base64
 
 
 
 
 
 
 
 
 
 
 
 
5
  st.markdown('<h1 style="color:black;">BDI Image classification model</h1>', unsafe_allow_html=True)
6
  learn = load_learner('export (5).pkl')
7
  upload = st.file_uploader('Insert image for classification', type=['png','jpg'])
 
2
  import streamlit as st
3
  from fastai.vision.all import *
4
  import base64
5
+ from streamlit_webrtc import webrtc_streamer
6
+ import av
7
+ import time
8
+
9
+
10
+ def video_frame_callback(frame):
11
+ time.sleep(1)
12
+ return frame
13
+
14
+
15
+ webrtc_streamer(key="example", video_frame_callback=video_frame_callback)
16
+
17
  st.markdown('<h1 style="color:black;">BDI Image classification model</h1>', unsafe_allow_html=True)
18
  learn = load_learner('export (5).pkl')
19
  upload = st.file_uploader('Insert image for classification', type=['png','jpg'])