Skip to content

Commit 919ba68

Browse files
authored
add logo
1 parent 216f2ad commit 919ba68

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

streamlit_app.py

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#from dotenv import load_dotenv
1818

1919
#load_dotenv()
20+
os.environ['API_KEY']='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'
2021
API_KEY = os.environ['API_KEY'] # API_KEY in streamlit secret
2122

2223
client = OpenAI(api_key=API_KEY)
@@ -40,8 +41,12 @@
4041
"""
4142

4243
with tab1:
43-
st.title('LAB LOKUN')
44-
st.subheader('Answer the questions, take a picture of your lab test results, and get your personal report immediately!')
44+
col1, mid, col2 = st.columns([1,1,10])
45+
with col1:
46+
st.image("https://i.ibb.co/869GgfZ/stethoscope-logo-text.jpg", width=100)
47+
with col2:
48+
st.subheader('Answer the questions, take a picture of your lab test results, and get your personal report immediately')
49+
#st.subheader('Answer the questions, take a picture of your lab test results, and get your personal report immediately')
4550

4651
# User inputs
4752
age = st.number_input("Enter your age", min_value=0, max_value=140, step=1,value="min")
@@ -96,21 +101,20 @@
96101
print (test_attributes)
97102
#test_results test_attributes
98103
full_output = ""
99-
dm = False
100-
BMI = False
101104
for key, value in test_results.items():
105+
dm = False
106+
anaemia = False
107+
LDLBP = False
108+
BMI = False
102109
print (f"looking at {key} and {value}")
103110
if value["test_found"]:
104111
if key == "hb":
105112
fbc_output = anaemia_analysis (test_results)
106-
print (f"FBC {fbc_output}")
107113
full_output += f"**FBC** \n{fbc_output} \n\n" # streamlit needs 2 whitespace before newline char
108114
elif key == "ldl_cholesterol":
109115
chol_output = getLDLBPtarget (test_attributes, test_results)
110-
print (f"LDL/BP {chol_output}")
111116
full_output += f"**LDL/BP** \n{chol_output} \n\n"
112117
elif key == "glucose" or key == "hba1c":
113-
print (f"in DM and checking if entered before {dm}")
114118
if not dm:
115119
glucose_output = get_dm_advice(test_attributes, test_results)
116120
full_output += f"**Glucose** \n{glucose_output} \n\n"
@@ -120,11 +124,10 @@
120124
bp_output = "We need your cholesterol levels to interpret the blood pressure targets better. In general, aim for a blood pressure <140/90. \n\n"
121125
full_output += f"**BP** \n{bp_output}\n"
122126
elif key == "weight" or key == "height":
123-
print (f"in BMI and checking if entered before {BMI}")
124127
if not BMI:
125128
bmi_output = bmi_advice(test_results)
126129
BMI = True
127-
full_output += f"**BMI** \n{bmi_output} \n\n"
130+
full_output += f"**BMI** \n{bmi_output} \n\n"
128131
print(full_output)
129132
if full_output == "": # if no supported lab results found
130133
full_output = "No supported medical lab results detected in your image. \nCheck if your image contains lab results listed in our About page."
@@ -134,9 +137,13 @@
134137

135138

136139
with tab2:
137-
st.markdown("**Lab Lokun** is an AI-assisted app that interprets and explains blood and lab test reports to provide personalised health advice and recommendations using Singapore ACG guidelines. **Lab Lokun** is co-created by doctors and non-doctors who have interpreted indecipherable lab results to their friends and family too many times.")
138-
st.header('Lab measurements included for analysis')
140+
col1, mid, col2 = st.columns([1,1,10])
141+
with col1:
142+
st.image("https://i.ibb.co/869GgfZ/stethoscope-logo-text.jpg", width=100)
143+
with col2:
144+
st.markdown("**Lab Lokun** is an AI-assisted app that interprets and explains blood and lab test reports to provide personalised health advice and recommendations using Singapore ACG guidelines. **Lab Lokun** is co-created by doctors and non-doctors who have interpreted indecipherable lab results to their friends and family too many times.")
145+
st.subheader('Lab measurements included for analysis')
139146
st.markdown(measurements_list)
140-
st.write('Other lab tests will be added soon...stay tuned!')
147+
st.write('Other lab tests will be added soon...stay tuned!')
141148

142149
st.caption('Disclaimer: Information provided through our app is for informational and educational purposes only and is not intended as a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition.')

0 commit comments

Comments
 (0)