From b362c7e273bde632fbc3baf415a73dba480496fb Mon Sep 17 00:00:00 2001 From: Yusuf Okunlola Date: Wed, 17 May 2023 02:00:39 +0100 Subject: [PATCH 1/4] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3708b92..efffdfc 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ This project is outlined to data inspection, transformation/pre-processing, mode To run the app locally, you need to initiate the following command from your terminal: -`streamlit run app.py` +```bash +streamlit run app.py +``` To run the app online, click [Malaria Predictor App](https://yusufokunlola-teamflask-notebook-app-c7gl4z.streamlit.app/) From 39931f044f8ff15cc79ebc9700b2c9571f5125f0 Mon Sep 17 00:00:00 2001 From: yusufokunlola Date: Wed, 17 May 2023 02:35:42 +0100 Subject: [PATCH 2/4] Updated dropdown for Region --- app.py | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/app.py b/app.py index 4c9e04c..6cab2b0 100644 --- a/app.py +++ b/app.py @@ -11,26 +11,9 @@ st.header("") -st.markdown("

Select variables to predict malaria incidence

", unsafe_allow_html=True) -st.text('') - -st.markdown('

Region: \ -

\ -

' , unsafe_allow_html=True) - -st.text('') -st.text('') -region = st.selectbox( - 'Select Region', - ('0', '1', '2', '3', '4')) +region = st.selectbox('Region', ('Central Africa', 'East Africa', 'North Africa', 'Southern Africa', 'West Africa')) +region = 0 if region == 'Central Africa' else 1 if region == 'East Africa' else 2 if region == 'North Africa' else 3 if region == 'Southern Africa' else 4 -st.write('You selected:', region) st.text('') From 2affc702185210e00a1dba2e0e73c12e9247ba58 Mon Sep 17 00:00:00 2001 From: Yusuf Okunlola Date: Sat, 19 Oct 2024 10:35:30 +0100 Subject: [PATCH 3/4] Update requirements.txt --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index aa091db..1a8da64 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -streamlit==1.7.0 -scikit-learn==1.1.1 -numpy==1.22.4 \ No newline at end of file +streamlit +scikit-learn +numpy From 1f776dcd263b8a34904afd10dc06999bdc80be26 Mon Sep 17 00:00:00 2001 From: Yusuf Okunlola Date: Sat, 19 Oct 2024 10:36:56 +0100 Subject: [PATCH 4/4] Update app.py --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 6cab2b0..0dd90bd 100644 --- a/app.py +++ b/app.py @@ -2,7 +2,7 @@ import numpy as np import pickle -st.set_option('deprecation.showfileUploaderEncoding',False) +#st.set_option('deprecation.showfileUploaderEncoding',False) model = pickle.load(open('finalized_model.sav','rb')) @@ -47,4 +47,4 @@ st.markdown('`Code:` [GitHub](https://github.com/yusufokunlola/TeamFlask_notebook)') # Reference: Santiago VĂ­quez (2023). How to Deploy Machine Learning Models with Python & Streamlit. -# Accessed on 29/4/2023. https://365datascience.com/tutorials/machine-learning-tutorials/how-to-deploy-machine-learning-models-with-python-and-streamlit/ \ No newline at end of file +# Accessed on 29/4/2023. https://365datascience.com/tutorials/machine-learning-tutorials/how-to-deploy-machine-learning-models-with-python-and-streamlit/