Pradeep018 commited on
Commit
42075c6
·
verified ·
1 Parent(s): e4b888d

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -0
app.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from pipeline import detectPipeline
3
+
4
+
5
+ st.title('Sign Language Letters detection')
6
+ st.write('Detects Sign language Alphabets in an image \nPowered by YOLOv8 Nano model')
7
+
8
+ st.write('')
9
+
10
+ detect_pipeline = detectPipeline()
11
+
12
+ st.info('Sign Language Letters detection model loaded successfully!')
13
+
14
+ uploaded_file = st.file_uploader("Upload an image", type=["jpg", "png", "jpeg"])
15
+
16
+ if uploaded_file is not None:
17
+
18
+ with st.container():
19
+ col1, col2 = st.columns([3, 3])
20
+
21
+ col1.header('Input Image')
22
+ col1.image(uploaded_file, caption='Uploaded Image', use_column_width=True)
23
+
24
+ col1.text('')
25
+ col1.text('')
26
+
27
+ if st.button('Detect'):
28
+ detections = detect_pipeline.detect_signs(img_path=uploaded_file)
29
+ detections_img = detect_pipeline.drawDetections2Image(img_path=uploaded_file, detections=detections)
30
+
31
+ col2.header('Detections')
32
+ col2.image(detections_img, caption='Predictions by model', use_column_width=True)
33
+