Commit ·
8bad435
1
Parent(s): 8197ee0
Upload 3 files
Browse files- app.py +51 -0
- final_model.pkl +3 -0
- requirements.txt +7 -0
app.py
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import eda
|
| 3 |
+
import model
|
| 4 |
+
from PIL import Image
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
page = st.sidebar.selectbox(label='Select Page:', options=['Home Page', 'Exploration Data Analysis', 'Model Prediksi'])
|
| 10 |
+
|
| 11 |
+
if page == 'Home Page':
|
| 12 |
+
st.title("Milestone 2")
|
| 13 |
+
st.write('Name : Rizqia Dewi Annisa')
|
| 14 |
+
st.write('Batch : HCK-010')
|
| 15 |
+
st.write('Objective : Develop a predictive analytics tool to analyze sleep disorder. The goal is to identify people who has sleep disorder(sleep apnea or insomnia) or Normal.')
|
| 16 |
+
st.caption('Select another menu from the left-side Select Box on your screen to get started!')
|
| 17 |
+
st.write('')
|
| 18 |
+
st.write('')
|
| 19 |
+
st.title("Sleep Disorder Prediction")
|
| 20 |
+
st.subheader('What is Sleep Disorder ?')
|
| 21 |
+
img1 = Image.open('Symptoms-Of-Sleep-Disorders.jpg')
|
| 22 |
+
img2 = Image.open('Causes-Of-Sleep-Disorders.jpg')
|
| 23 |
+
img3 = Image.open('Treatment-Of-Sleep-Disorders.jpg')
|
| 24 |
+
st.image(img1, width=400, use_column_width=True)
|
| 25 |
+
st.image(img2, width=400, use_column_width=True)
|
| 26 |
+
st.image(img3, width=400, use_column_width=True)
|
| 27 |
+
|
| 28 |
+
with st.expander("Background"):
|
| 29 |
+
st.caption('''
|
| 30 |
+
Banyak sekali orang yang mengalami gejala sulit saat tidur, terkadang mereka sulit untuk menentukan apa yang terjadi dengan diri mereka.
|
| 31 |
+
Apabila mereka mendiagnosa sendiri, dikhawatirkan akan mempegaruhi kondisi kesehatan mereka yang lain. Untuk itu dibuatlah aplikasi ini guna
|
| 32 |
+
membantu orang-orang yang kesulitan dalam memahami apa yang terjadi pada dirinya, ketika mengalami kesulitan dalam tidur.
|
| 33 |
+
''')
|
| 34 |
+
|
| 35 |
+
with st.expander("Problem Statement"):
|
| 36 |
+
st.caption('''
|
| 37 |
+
Mengindentifikasi mengapa seseorang mengalami sulit tidur. Namun masih perlu ada penanganan khusus atau konsultasikan kembali dengan dokter apabila
|
| 38 |
+
terindikasi mengalami gangguan tidur. Aplikasi kasih ini hanya untuk indikasi awal, bukan untuk pengambilan kesimpulan.
|
| 39 |
+
''')
|
| 40 |
+
|
| 41 |
+
with st.expander("Conclusion"):
|
| 42 |
+
st.caption('''
|
| 43 |
+
0 berarti orang yang tidak mengalami gangguan tidur,
|
| 44 |
+
1 berarti seseorang mengalami indikasi awal sleep apnea,
|
| 45 |
+
sedangkan 2 seseorang tersebut terindikasi mengalami insomnia.
|
| 46 |
+
''')
|
| 47 |
+
|
| 48 |
+
elif page == 'Exploration Data Analysis':
|
| 49 |
+
eda.run()
|
| 50 |
+
else:
|
| 51 |
+
model.run()
|
final_model.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ca27547e1781ffe897412c5ea68868a658358248262794af5e09c28d6c589aca
|
| 3 |
+
size 209649
|
requirements.txt
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pandas==1.5.3
|
| 2 |
+
numpy==1.25.2
|
| 3 |
+
seaborn==0.12.2
|
| 4 |
+
matplotlib==3.7.2
|
| 5 |
+
scikit-learn==1.3.0
|
| 6 |
+
imbalanced-learn==0.11.0
|
| 7 |
+
feature-engine==1.6.1
|