From 3a3a9a344283a9c93b5a0dcb073c14f4a271457c Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Thu, 11 Jan 2024 22:50:10 +0800 Subject: [PATCH 01/50] Update streamlit_app.py --- streamlit_app.py | 51 +++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/streamlit_app.py b/streamlit_app.py index 7a0ed1272052..2d7784bff87f 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -13,28 +13,31 @@ In the meantime, below is an example of what you can do with just a few lines of code: """ -num_points = st.slider("Number of points in spiral", 1, 10000, 1100) -num_turns = st.slider("Number of turns in spiral", 1, 300, 31) - -indices = np.linspace(0, 1, num_points) -theta = 2 * np.pi * num_turns * indices -radius = indices - -x = radius * np.cos(theta) -y = radius * np.sin(theta) - -df = pd.DataFrame({ - "x": x, - "y": y, - "idx": indices, - "rand": np.random.randn(num_points), -}) +import streamlit as st +import pandas as pd +import numpy as np -st.altair_chart(alt.Chart(df, height=700, width=700) - .mark_point(filled=True) - .encode( - x=alt.X("x", axis=None), - y=alt.Y("y", axis=None), - color=alt.Color("idx", legend=None, scale=alt.Scale()), - size=alt.Size("rand", legend=None, scale=alt.Scale(range=[1, 150])), - )) +st.title('Explain my test results please!') +st.header('Instructions') +st.markdown('Take a picture of your lab test results, upload it, and we will explain it to you!') + + +def load_image(): + uploaded_file = st.file_uploader(label='Upload your test results image below:') + if uploaded_file is not None: + image_data = uploaded_file.getvalue() + st.image(image_data, caption='', width=600) + return image_data + +image = load_image() +if image is not None: + image = np.asarray(Image.open(BytesIO(image)).convert('RGB')) +if st.button('Process Image'): + result = ocr_model.ocr(image) + texts = [res[1][0] for res in result[0] if len(res[1][0]) > 1] + result = llm(prompt_template_extract.format(text=",".join(texts))) + print("result: ", result) + result = literal_eval(result) + result['drug'] = " ".join(result['drug'].split(" ")[:2]) + +st.caption('Disclaimer: Not medical advice, not liable, blah') From e2ff55457094120463824d977820fdfe11ab83f4 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Thu, 11 Jan 2024 22:56:25 +0800 Subject: [PATCH 02/50] Update streamlit_app.py --- streamlit_app.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/streamlit_app.py b/streamlit_app.py index 2d7784bff87f..ec719cd2346c 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -1,22 +1,7 @@ -import altair as alt import numpy as np import pandas as pd import streamlit as st -""" -# Welcome to Streamlit! - -Edit `/streamlit_app.py` to customize this app to your heart's desire :heart:. -If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community -forums](https://discuss.streamlit.io). - -In the meantime, below is an example of what you can do with just a few lines of code: -""" - -import streamlit as st -import pandas as pd -import numpy as np - st.title('Explain my test results please!') st.header('Instructions') st.markdown('Take a picture of your lab test results, upload it, and we will explain it to you!') From 010ec2bf12449e651e2c52e254feb5ebdb8caa96 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:05:47 +0800 Subject: [PATCH 03/50] Update streamlit_app.py --- streamlit_app.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/streamlit_app.py b/streamlit_app.py index ec719cd2346c..a9e96df8f97a 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -1,6 +1,6 @@ -import numpy as np -import pandas as pd import streamlit as st +import pandas as pd +import numpy as np st.title('Explain my test results please!') st.header('Instructions') @@ -10,14 +10,17 @@ def load_image(): uploaded_file = st.file_uploader(label='Upload your test results image below:') if uploaded_file is not None: + st.success("Image uploaded") # Toast message image_data = uploaded_file.getvalue() - st.image(image_data, caption='', width=600) + st.image(image_data, caption='', use_column_width=True) # Adjust width for mobile screens return image_data image = load_image() if image is not None: image = np.asarray(Image.open(BytesIO(image)).convert('RGB')) + if st.button('Process Image'): + st.success("HAVEN'T WROTE CODE YET TO PROCESS") # Toast message result = ocr_model.ocr(image) texts = [res[1][0] for res in result[0] if len(res[1][0]) > 1] result = llm(prompt_template_extract.format(text=",".join(texts))) From 000ad4025b8b5a7c51cd744a082e83eee3d4ae6e Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:08:35 +0800 Subject: [PATCH 04/50] Update requirements.txt --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 502d7d1a0d19..0fdcaf1250dd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ -altair +cv2 pandas streamlit +paddleocr From 515d85d900e6bec0a3d3d5a98a93fa7a4a0c3a97 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:08:49 +0800 Subject: [PATCH 05/50] Update streamlit_app.py --- streamlit_app.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/streamlit_app.py b/streamlit_app.py index a9e96df8f97a..26db1a4a056f 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -1,6 +1,10 @@ import streamlit as st import pandas as pd import numpy as np +import cv2 +import os +import base64 +from paddleocr import PPStructure,draw_structure_result,save_structure_res st.title('Explain my test results please!') st.header('Instructions') From f25775ec8911e9b0d1ddca959ab4b45b57535ee9 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:11:58 +0800 Subject: [PATCH 06/50] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 0fdcaf1250dd..e4c0e638e2f5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ cv2 pandas streamlit paddleocr +Pillow From 21e04bc702fb14bc35e8ccdefd2d924f0413158a Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:12:25 +0800 Subject: [PATCH 07/50] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e4c0e638e2f5..6ff195c5d30c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,4 @@ cv2 pandas streamlit paddleocr -Pillow +opencv-python From 09c1a8744f5476c942739512e83bdf51f195f40b Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:12:36 +0800 Subject: [PATCH 08/50] Update requirements.txt --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6ff195c5d30c..d7267cc3e46b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -cv2 pandas streamlit paddleocr From e98a211f340f70144a25eb51961fbc3ebb624259 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:17:09 +0800 Subject: [PATCH 09/50] Update streamlit_app.py --- streamlit_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streamlit_app.py b/streamlit_app.py index 26db1a4a056f..fb9b9356e794 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -1,7 +1,7 @@ import streamlit as st import pandas as pd import numpy as np -import cv2 +#import cv2 import os import base64 from paddleocr import PPStructure,draw_structure_result,save_structure_res From f3cc66dcff2e201ec356659c3806ce7f1f01b379 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:17:30 +0800 Subject: [PATCH 10/50] Update streamlit_app.py --- streamlit_app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/streamlit_app.py b/streamlit_app.py index fb9b9356e794..b8ec63a7b214 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -1,10 +1,10 @@ import streamlit as st import pandas as pd import numpy as np -#import cv2 import os import base64 -from paddleocr import PPStructure,draw_structure_result,save_structure_res +#import cv2 +#from paddleocr import PPStructure,draw_structure_result,save_structure_res st.title('Explain my test results please!') st.header('Instructions') From 788906d737d684e6b8c20752d09181119026fb86 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:26:15 +0800 Subject: [PATCH 11/50] Update requirements.txt --- requirements.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d7267cc3e46b..096889738eb5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,9 @@ pandas streamlit paddleocr -opencv-python +numpy==1.23.5 +opencv_contrib_python==4.9.0.80 +opencv_python==4.8.1.78 +opencv_python_headless==4.9.0.80 +paddleocr==2.6.0.1 +paddleocr.egg==info From 0b90d1179329a98eb6bec512807d75e31615ff46 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:26:33 +0800 Subject: [PATCH 12/50] Update streamlit_app.py --- streamlit_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streamlit_app.py b/streamlit_app.py index b8ec63a7b214..26199ec25ef7 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -3,7 +3,7 @@ import numpy as np import os import base64 -#import cv2 +import cv2 #from paddleocr import PPStructure,draw_structure_result,save_structure_res st.title('Explain my test results please!') From 5e373c62acdceedfd2c9855927532141d0197b32 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:28:16 +0800 Subject: [PATCH 13/50] Update streamlit_app.py --- streamlit_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streamlit_app.py b/streamlit_app.py index 26199ec25ef7..b8ec63a7b214 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -3,7 +3,7 @@ import numpy as np import os import base64 -import cv2 +#import cv2 #from paddleocr import PPStructure,draw_structure_result,save_structure_res st.title('Explain my test results please!') From f99c28679334cffe0df935705cf394f4678b513e Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:31:52 +0800 Subject: [PATCH 14/50] Update requirements.txt --- requirements.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 096889738eb5..c17c0ee45f87 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,8 @@ pandas streamlit -paddleocr numpy==1.23.5 opencv_contrib_python==4.9.0.80 opencv_python==4.8.1.78 opencv_python_headless==4.9.0.80 -paddleocr==2.6.0.1 -paddleocr.egg==info +paddleocr +paddlepaddle From ffcb83709bf797cd95111ff86000b35e2c3e745e Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:36:26 +0800 Subject: [PATCH 15/50] Update streamlit_app.py --- streamlit_app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/streamlit_app.py b/streamlit_app.py index b8ec63a7b214..09bf63a4a21b 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -6,6 +6,9 @@ #import cv2 #from paddleocr import PPStructure,draw_structure_result,save_structure_res +pip = os.popen('pip list').read() +st.code(pip,language=None) + st.title('Explain my test results please!') st.header('Instructions') st.markdown('Take a picture of your lab test results, upload it, and we will explain it to you!') From 98312a8fb9d47f78fd4de50dd0b5594e340da856 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:37:33 +0800 Subject: [PATCH 16/50] Update streamlit_app.py --- streamlit_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streamlit_app.py b/streamlit_app.py index 09bf63a4a21b..0fb602e5fcbc 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -3,7 +3,7 @@ import numpy as np import os import base64 -#import cv2 +import cv2 #from paddleocr import PPStructure,draw_structure_result,save_structure_res pip = os.popen('pip list').read() From aeda74d68727a545975ed9bb5fade06b45c6c204 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:39:28 +0800 Subject: [PATCH 17/50] Update streamlit_app.py --- streamlit_app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/streamlit_app.py b/streamlit_app.py index 0fb602e5fcbc..b855ba75d2de 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -3,7 +3,8 @@ import numpy as np import os import base64 -import cv2 +from paddleocr import PaddleOCR +#import cv2 #from paddleocr import PPStructure,draw_structure_result,save_structure_res pip = os.popen('pip list').read() From e20ed68cc0c896d76015720b78587065998b78be Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:41:15 +0800 Subject: [PATCH 18/50] Update requirements.txt --- requirements.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index c17c0ee45f87..c863b4b99230 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,7 @@ pandas streamlit numpy==1.23.5 -opencv_contrib_python==4.9.0.80 -opencv_python==4.8.1.78 -opencv_python_headless==4.9.0.80 +opencv_python +opencv_python_headless paddleocr paddlepaddle From 0a4f96f7002dc4ae30b5592877770b700c3104a5 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:41:50 +0800 Subject: [PATCH 19/50] Update streamlit_app.py --- streamlit_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streamlit_app.py b/streamlit_app.py index b855ba75d2de..3f079ad15432 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -4,7 +4,7 @@ import os import base64 from paddleocr import PaddleOCR -#import cv2 +import cv2 #from paddleocr import PPStructure,draw_structure_result,save_structure_res pip = os.popen('pip list').read() From 12055b2daaaa8ee782f423cb5ad1e987cbdd47a1 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:47:59 +0800 Subject: [PATCH 20/50] Update streamlit_app.py --- streamlit_app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/streamlit_app.py b/streamlit_app.py index 3f079ad15432..4f93cb92db68 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -3,8 +3,8 @@ import numpy as np import os import base64 -from paddleocr import PaddleOCR -import cv2 +#from paddleocr import PaddleOCR +#import cv2 #from paddleocr import PPStructure,draw_structure_result,save_structure_res pip = os.popen('pip list').read() From b5156b0905e23135f67c50c502d2a37ee9457577 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:48:17 +0800 Subject: [PATCH 21/50] Update requirements.txt --- requirements.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index c863b4b99230..980327b9f29d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,3 @@ -pandas -streamlit -numpy==1.23.5 opencv_python -opencv_python_headless paddleocr paddlepaddle From 583b7e3d753f1c83a9be0e285bb85033d87883fd Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:51:04 +0800 Subject: [PATCH 22/50] Update streamlit_app.py --- streamlit_app.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/streamlit_app.py b/streamlit_app.py index 4f93cb92db68..ee23b70cc391 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -7,9 +7,6 @@ #import cv2 #from paddleocr import PPStructure,draw_structure_result,save_structure_res -pip = os.popen('pip list').read() -st.code(pip,language=None) - st.title('Explain my test results please!') st.header('Instructions') st.markdown('Take a picture of your lab test results, upload it, and we will explain it to you!') From f072235261a1465638c26353ef26ce6d969f4d5e Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 22:15:03 +0800 Subject: [PATCH 23/50] Update requirements.txt --- requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements.txt b/requirements.txt index 980327b9f29d..13602138719b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,5 @@ opencv_python paddleocr paddlepaddle +streamlit +openai From 55e16f4440d5685916a8319806a84476019d2d12 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 22:15:58 +0800 Subject: [PATCH 24/50] Update streamlit_app.py --- streamlit_app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/streamlit_app.py b/streamlit_app.py index ee23b70cc391..3213edfbaf2c 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -11,6 +11,8 @@ st.header('Instructions') st.markdown('Take a picture of your lab test results, upload it, and we will explain it to you!') +result = os.popen('pip list').read() +st.code(result, language=None) def load_image(): uploaded_file = st.file_uploader(label='Upload your test results image below:') From b7dcdc545100ed45e3a070a881e27da438ffb176 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 22:20:25 +0800 Subject: [PATCH 25/50] Update streamlit_app.py --- streamlit_app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/streamlit_app.py b/streamlit_app.py index 3213edfbaf2c..be95250aafe8 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -3,6 +3,7 @@ import numpy as np import os import base64 +import openai #from paddleocr import PaddleOCR #import cv2 #from paddleocr import PPStructure,draw_structure_result,save_structure_res From 0e1ee922e49a15e2eb68ac5295434df028a51054 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 22:26:43 +0800 Subject: [PATCH 26/50] Update streamlit_app.py --- streamlit_app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/streamlit_app.py b/streamlit_app.py index be95250aafe8..2f3299fb1031 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -3,7 +3,7 @@ import numpy as np import os import base64 -import openai +from openai import OpenAI #from paddleocr import PaddleOCR #import cv2 #from paddleocr import PPStructure,draw_structure_result,save_structure_res @@ -14,7 +14,7 @@ result = os.popen('pip list').read() st.code(result, language=None) - +client = OpenAI() def load_image(): uploaded_file = st.file_uploader(label='Upload your test results image below:') if uploaded_file is not None: From 2ef4e988bdc617ed43e54df3fdfafd9dc21a592b Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 22:28:36 +0800 Subject: [PATCH 27/50] Update streamlit_app.py --- streamlit_app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/streamlit_app.py b/streamlit_app.py index 2f3299fb1031..dde5062a72a8 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -4,7 +4,7 @@ import os import base64 from openai import OpenAI -#from paddleocr import PaddleOCR +from paddleocr import PaddleOCR #import cv2 #from paddleocr import PPStructure,draw_structure_result,save_structure_res @@ -14,7 +14,7 @@ result = os.popen('pip list').read() st.code(result, language=None) -client = OpenAI() + def load_image(): uploaded_file = st.file_uploader(label='Upload your test results image below:') if uploaded_file is not None: From 940f0064ee4c672377c3c99d119e28500fe05a94 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 22:36:39 +0800 Subject: [PATCH 28/50] Create packages.txt --- packages.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 packages.txt diff --git a/packages.txt b/packages.txt new file mode 100644 index 000000000000..f359f073a1f1 --- /dev/null +++ b/packages.txt @@ -0,0 +1 @@ +libgl1-mesa-glx From 48876ec5605e7b8cf654ce85bec053d6e00d5807 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 22:39:46 +0800 Subject: [PATCH 29/50] Update streamlit_app.py --- streamlit_app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/streamlit_app.py b/streamlit_app.py index dde5062a72a8..8af85403c2b9 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -4,9 +4,9 @@ import os import base64 from openai import OpenAI -from paddleocr import PaddleOCR -#import cv2 -#from paddleocr import PPStructure,draw_structure_result,save_structure_res +#from paddleocr import PaddleOCR +import cv2 +from paddleocr import PPStructure,draw_structure_result,save_structure_res st.title('Explain my test results please!') st.header('Instructions') From 7e59c8b13aedd415e38ca5e00cbc159b26efba2a Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Fri, 12 Jan 2024 22:40:08 +0800 Subject: [PATCH 30/50] Update streamlit_app.py --- streamlit_app.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/streamlit_app.py b/streamlit_app.py index 8af85403c2b9..495c1eec9710 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -12,9 +12,6 @@ st.header('Instructions') st.markdown('Take a picture of your lab test results, upload it, and we will explain it to you!') -result = os.popen('pip list').read() -st.code(result, language=None) - def load_image(): uploaded_file = st.file_uploader(label='Upload your test results image below:') if uploaded_file is not None: From fbfe353f18d52d5fffe45168d198033b8c316631 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Sat, 13 Jan 2024 00:40:56 +0800 Subject: [PATCH 31/50] Update streamlit_app.py --- streamlit_app.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/streamlit_app.py b/streamlit_app.py index 495c1eec9710..74ea1291bef9 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -2,11 +2,11 @@ import pandas as pd import numpy as np import os +import time import base64 from openai import OpenAI -#from paddleocr import PaddleOCR import cv2 -from paddleocr import PPStructure,draw_structure_result,save_structure_res +from paddleocr import PaddleOCR st.title('Explain my test results please!') st.header('Instructions') @@ -15,22 +15,26 @@ def load_image(): uploaded_file = st.file_uploader(label='Upload your test results image below:') if uploaded_file is not None: - st.success("Image uploaded") # Toast message + st.toast("Image uploaded") # Toast message image_data = uploaded_file.getvalue() st.image(image_data, caption='', use_column_width=True) # Adjust width for mobile screens return image_data + +ocr_model = PaddleOCR(use_angle_cls=True, lang='en') image = load_image() -if image is not None: - image = np.asarray(Image.open(BytesIO(image)).convert('RGB')) if st.button('Process Image'): - st.success("HAVEN'T WROTE CODE YET TO PROCESS") # Toast message + start_time = time.time() result = ocr_model.ocr(image) - texts = [res[1][0] for res in result[0] if len(res[1][0]) > 1] - result = llm(prompt_template_extract.format(text=",".join(texts))) - print("result: ", result) - result = literal_eval(result) - result['drug'] = " ".join(result['drug'].split(" ")[:2]) + inner_result = result[0] + extracted_text = '' + for idx in range(len(result)): + txt = result[idx][1][0] + extracted_text += txt + " " + end_time = time.time() + extract_time = int(end_time - start_time) + st.markdown(extracted_text) + st.success(f"Extracted values in {extract_time} seconds.") # Use status instead of toast/success st.caption('Disclaimer: Not medical advice, not liable, blah') From bdbf4ea3749c53e167557d6b0115e1b7c4b5069e Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Sat, 13 Jan 2024 00:46:55 +0800 Subject: [PATCH 32/50] Update streamlit_app.py --- streamlit_app.py | 1 - 1 file changed, 1 deletion(-) diff --git a/streamlit_app.py b/streamlit_app.py index 74ea1291bef9..301eecfa7d18 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -27,7 +27,6 @@ def load_image(): if st.button('Process Image'): start_time = time.time() result = ocr_model.ocr(image) - inner_result = result[0] extracted_text = '' for idx in range(len(result)): txt = result[idx][1][0] From f2c6a6da728e09346d6d5e6c901cfd93267dfe47 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Sat, 13 Jan 2024 00:59:20 +0800 Subject: [PATCH 33/50] Update streamlit_app.py --- streamlit_app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/streamlit_app.py b/streamlit_app.py index 301eecfa7d18..0369b880413a 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -30,6 +30,7 @@ def load_image(): extracted_text = '' for idx in range(len(result)): txt = result[idx][1][0] + st.write(txt) extracted_text += txt + " " end_time = time.time() extract_time = int(end_time - start_time) From c9d5d7df58e499b78f6aa7bc3083634154774c67 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Sat, 13 Jan 2024 01:08:35 +0800 Subject: [PATCH 34/50] Update streamlit_app.py --- streamlit_app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/streamlit_app.py b/streamlit_app.py index 0369b880413a..63abb09adba9 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -27,6 +27,7 @@ def load_image(): if st.button('Process Image'): start_time = time.time() result = ocr_model.ocr(image) + st.code(result) extracted_text = '' for idx in range(len(result)): txt = result[idx][1][0] From c3b241116f0edfb9e46937baa613311939d1b639 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Sat, 13 Jan 2024 01:13:32 +0800 Subject: [PATCH 35/50] Update streamlit_app.py --- streamlit_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streamlit_app.py b/streamlit_app.py index 63abb09adba9..5b029fa77c45 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -29,7 +29,7 @@ def load_image(): result = ocr_model.ocr(image) st.code(result) extracted_text = '' - for idx in range(len(result)): + for idx in range(len(result[0]): #idk why this needs a result[0] instead of result txt = result[idx][1][0] st.write(txt) extracted_text += txt + " " From d4864742198be66fc7c71b7fdd7e50a1e8a74bf6 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Sat, 13 Jan 2024 01:13:55 +0800 Subject: [PATCH 36/50] Update streamlit_app.py --- streamlit_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streamlit_app.py b/streamlit_app.py index 5b029fa77c45..af5b7a77be9c 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -29,7 +29,7 @@ def load_image(): result = ocr_model.ocr(image) st.code(result) extracted_text = '' - for idx in range(len(result[0]): #idk why this needs a result[0] instead of result + for idx in range(len(result[0]): txt = result[idx][1][0] st.write(txt) extracted_text += txt + " " From 9b2a6fbb9751e2d995b9a035ab698df052d90239 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Sat, 13 Jan 2024 01:14:28 +0800 Subject: [PATCH 37/50] Update streamlit_app.py --- streamlit_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streamlit_app.py b/streamlit_app.py index af5b7a77be9c..3fae157f616a 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -29,7 +29,7 @@ def load_image(): result = ocr_model.ocr(image) st.code(result) extracted_text = '' - for idx in range(len(result[0]): + for idx in range(len(result[0])): #idk why this needs a result[0] instead of result txt = result[idx][1][0] st.write(txt) extracted_text += txt + " " From fe2f5f282f95325588451e611d197dde9f2678ab Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Sat, 13 Jan 2024 01:17:17 +0800 Subject: [PATCH 38/50] Update streamlit_app.py --- streamlit_app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/streamlit_app.py b/streamlit_app.py index 3fae157f616a..610aec9c45b2 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -27,9 +27,11 @@ def load_image(): if st.button('Process Image'): start_time = time.time() result = ocr_model.ocr(image) + result = result[0] + #idk why this needs a result[0] instead of result st.code(result) extracted_text = '' - for idx in range(len(result[0])): #idk why this needs a result[0] instead of result + for idx in range(len(result)): txt = result[idx][1][0] st.write(txt) extracted_text += txt + " " From 9c4767d187962b8e5fdf01302e82ec4803ea5f20 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Sat, 13 Jan 2024 01:20:16 +0800 Subject: [PATCH 39/50] Update streamlit_app.py --- streamlit_app.py | 1 - 1 file changed, 1 deletion(-) diff --git a/streamlit_app.py b/streamlit_app.py index 610aec9c45b2..87b1912035cf 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -33,7 +33,6 @@ def load_image(): extracted_text = '' for idx in range(len(result)): txt = result[idx][1][0] - st.write(txt) extracted_text += txt + " " end_time = time.time() extract_time = int(end_time - start_time) From 5ed1e0a365ee87343c26d1dadbd9afbd690934e0 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Sat, 20 Jan 2024 16:14:41 +0800 Subject: [PATCH 40/50] Create main.yml --- .github/workflows/main.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000000..0f46cbf6bd07 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,5 @@ +name: secret-test +on: [push] +env: + API_KEY: ${{ secrets.API_KEY }} + From 8009d42a44a0f0606da9b94afbe0325a54db0a4f Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Sat, 20 Jan 2024 16:15:56 +0800 Subject: [PATCH 41/50] Update streamlit_app.py --- streamlit_app.py | 179 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 162 insertions(+), 17 deletions(-) diff --git a/streamlit_app.py b/streamlit_app.py index 87b1912035cf..09534a412bb0 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -4,13 +4,104 @@ import os import time import base64 +import json from openai import OpenAI import cv2 from paddleocr import PaddleOCR -st.title('Explain my test results please!') -st.header('Instructions') -st.markdown('Take a picture of your lab test results, upload it, and we will explain it to you!') +# REMOVE THIS BEFORE COPYING TO GITHUB! +API_KEY = os.environ['API_KEY'] + +test_attributes = {} + +client = OpenAI(api_key=API_KEY) + +template_prompt = """ +Extract the items from the health screening result listed below into a json format, using the example json template. Ignore other items not listed in the json template. Output data types are "test_found" (True/False), "test_value" (float), "test_unit" (string in lower case), "test_ref_min" (float), "test_ref_max" (float). If test item is not found, output False for "test_found", and output False for the other values. If test is found but reference max, reference min, or reference range is not found, output False for "test_ref_min" and "test_ref_max". + +Example output json template +{ + "ldl_cholesterol": { + "test_found":True, + "test_value":20, + "test_unit":"mmol/l", + "test_ref_min":False, + "test_ref_max":False + }, + "hdl_cholesterol": { + "test_found":True, + "test_value":20, + "test_unit":"mmol/l", + "test_ref_min":False, + "test_ref_max":False + }, + "total_cholesterol": { + "test_found":True, + "test_value":20, + "test_unit":"mmol/l", + "test_ref_min":False, + "test_ref_max":False + }, + "mcv":{ + "test_found":False, + "test_value":False, + "test_unit":False, + "test_ref_min":False, + "test_ref_max":False + }, + "hb:{ + "test_found":False, + "test_value":False, + "test_unit":False, + "test_ref_min":False, + "test_ref_max":False + }, + "uric_acid:{ + "test_found":False, + "test_value":False, + "test_unit":False, + "test_ref_min":False, + "test_ref_max":False + }, + "hba1c:{ + "test_found":False, + "test_value":False, + "test_unit":False, + "test_ref_min":False, + "test_ref_max":False + }, + "systolic_bp:{ + "test_found":False, + "test_value":False, + "test_unit":False, + "test_ref_min":False, + "test_ref_max":False + }, + "diastolic_bp:{ + "test_found":False, + "test_value":False, + "test_unit":False, + "test_ref_min":False, + "test_ref_max":False + }, + "height:{ + "test_found":False, + "test_value":False, + "test_unit":False, + "test_ref_min":False, + "test_ref_max":False + }, + "weight:{ + "test_found":False, + "test_value":False, + "test_unit":False, + "test_ref_min":False, + "test_ref_max":False + } +} + +Health screening result: +""" def load_image(): uploaded_file = st.file_uploader(label='Upload your test results image below:') @@ -19,24 +110,78 @@ def load_image(): image_data = uploaded_file.getvalue() st.image(image_data, caption='', use_column_width=True) # Adjust width for mobile screens return image_data + +st.title('Explain my test results please!') +st.header('Instructions') +st.markdown('Answer the questions, take a picture of your lab test results, upload it, and we will explain it to you!') + +# User inputs +age = st.number_input("Enter your age", min_value=0, max_value=140, step=1,value="min") +sex = st.selectbox("Select your sex", ["Female","Male"]) +race = st.selectbox("Select your race", ["Chinese", "Malay", "Indian", "Others"]) +smoker = st.checkbox("Are you a smoker?") +stroke = st.checkbox("Have you ever had a stroke?") +diabetes = st.checkbox("Do you have a history of diabetes?") +heart_attack = st.checkbox("Have you ever had a heart attack?") +on_bp_meds = st.checkbox("Are you taking blood pressure medication?") +systolic_bp = st.number_input("Enter your last recorded systolic blood pressure (leave blank if not available)", min_value=50,max_value=300,value=None) ocr_model = PaddleOCR(use_angle_cls=True, lang='en') image = load_image() -if st.button('Process Image'): - start_time = time.time() - result = ocr_model.ocr(image) - result = result[0] - #idk why this needs a result[0] instead of result - st.code(result) - extracted_text = '' - for idx in range(len(result)): - txt = result[idx][1][0] - extracted_text += txt + " " - end_time = time.time() - extract_time = int(end_time - start_time) - st.markdown(extracted_text) - st.success(f"Extracted values in {extract_time} seconds.") # Use status instead of toast/success +if st.button('Analyse my results'): + # Save test attributes + test_attributes["age"] = age + test_attributes["sex"] = sex + test_attributes["race"] = race + test_attributes["smoker"] = smoker #true or false + test_attributes["stroke"] = stroke + test_attributes["diabetes"] = diabetes + test_attributes["heart_attack"] = heart_attack + test_attributes["on_BP_meds"] = on_bp_meds + test_attributes["systolic_blood_pressure"] = systolic_bp #null or integer + st.json(test_attributes) + # Extract text from image + if not image: #Image not uploaded + st.error("Upload an image of your test results first!",icon="🚨") + else: # Image uploaded + ocr_start_time = time.time() + result = ocr_model.ocr(image) + extracted_text = '' + for idx in range(len(result)): + txt = result[idx][1][0] + extracted_text += txt + " " + ocr_end_time = time.time() + ocr_time = int(ocr_end_time - ocr_start_time) + st.markdown(extracted_text) + st.success(f"Processed image in {ocr_time} seconds.") # Use status instead of toast/success + # Remove NRIC from extracted text + # Extract structured data from text using ChatGPT + # TODO: PUT TRY AND ERROR IF FAIL + extract_start_time = time.time() + extract_prompt = f"{template_prompt} {extracted_text}" + response = client.chat.completions.create( + model="gpt-3.5-turbo-1106", + response_format={ "type": "json_object" }, + messages=[ + {"role": "system", "content": "You are a helpful assistant designed to output JSON."}, + {"role": "user", "content": extract_prompt} + ] + ) + test_results = json.loads(response.choices[0].message.content) + st.json(test_results) + st.text(response.usage) + extract_end_time = time.time() + extract_time = int(extract_end_time - extract_start_time) + st.success(f"Extracted values in {extract_time} seconds.") # Use status instead of toast/success + for test_name, test_info in test_results.items(): + if test_info["test_found"]: + st.markdown(f"**Test Name:** {test_name.replace('_', ' ').upper()}") + st.markdown(f"**Test Value:** {test_info['test_value']} {test_info['test_unit']}") + #st.markdown(f"**Reference Range:** {test_info['test_ref_min']} - {test_info['test_ref_max']} {test_info['test_unit']}") + st.text("") + # Insert YT logic + st.caption('Disclaimer: Not medical advice, not liable, blah') From 871875a56326ccc89c2eed88c2cf9bcd734b3718 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Sat, 20 Jan 2024 16:20:27 +0800 Subject: [PATCH 42/50] Update main.yml --- .github/workflows/main.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0f46cbf6bd07..47512c87d806 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,9 @@ name: secret-test on: [push] -env: - API_KEY: ${{ secrets.API_KEY }} - +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - name: Hello world action + env: # Or as an environment variable + API_KEY: ${{ secrets.API_KEY }} From 190a14d4b08cabf1169694a842f4859f1f8c53e0 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Sat, 20 Jan 2024 16:23:46 +0800 Subject: [PATCH 43/50] Update streamlit_app.py --- streamlit_app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/streamlit_app.py b/streamlit_app.py index 09534a412bb0..01e1266f8984 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -148,6 +148,7 @@ def load_image(): else: # Image uploaded ocr_start_time = time.time() result = ocr_model.ocr(image) + result = result[0] #idk why this needs a result[0] instead of result for Github extracted_text = '' for idx in range(len(result)): txt = result[idx][1][0] From cab572f9cf940eb1894657577eeeaabad32b691a Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Sat, 20 Jan 2024 17:01:18 +0800 Subject: [PATCH 44/50] Update main.yml --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 47512c87d806..777784f9e40e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,5 +5,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Hello world action - env: # Or as an environment variable + run: python streamlit-example.py + env: API_KEY: ${{ secrets.API_KEY }} From a402e69e5c9df4687a44b7e9c18c91e693892c96 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Sat, 20 Jan 2024 17:05:41 +0800 Subject: [PATCH 45/50] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 777784f9e40e..d9e556444ccd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Hello world action - run: python streamlit-example.py + run: python streamlit-app.py env: API_KEY: ${{ secrets.API_KEY }} From c06f316ca121b1e17aebbf46808fc6432f0e0d03 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Sat, 20 Jan 2024 17:13:07 +0800 Subject: [PATCH 46/50] Update main.yml --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d9e556444ccd..33054801100d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,6 +4,8 @@ jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v2 - name: Hello world action run: python streamlit-app.py env: From f5e0a1eef69becef81aaa39a8b3728d70d80ffd6 Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Sat, 20 Jan 2024 17:19:15 +0800 Subject: [PATCH 47/50] Update main.yml --- .github/workflows/main.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 33054801100d..e8e7778314fc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,9 +4,7 @@ jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v2 - name: Hello world action - run: python streamlit-app.py + run: python streamlit-example/streamlit_app.py env: API_KEY: ${{ secrets.API_KEY }} From 9c5bc509c82dfeed9be2babc742a365e3b9c5c5c Mon Sep 17 00:00:00 2001 From: loonyx8 <66733801+loonyx8@users.noreply.github.com> Date: Sat, 20 Jan 2024 17:21:16 +0800 Subject: [PATCH 48/50] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e8e7778314fc..4700438890f7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Hello world action - run: python streamlit-example/streamlit_app.py + run: echo "JUST LOADING SECRET ONLY" env: API_KEY: ${{ secrets.API_KEY }} From 2a129c5d8dabfdcfc036b4d84bb90689d7d1c11e Mon Sep 17 00:00:00 2001 From: cobaltB12 Date: Sat, 20 Jan 2024 22:13:22 +0800 Subject: [PATCH 49/50] add quotation marks --- streamlit_app.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/streamlit_app.py b/streamlit_app.py index 01e1266f8984..33749a16f116 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -49,49 +49,49 @@ "test_ref_min":False, "test_ref_max":False }, - "hb:{ + "hb":{ "test_found":False, "test_value":False, "test_unit":False, "test_ref_min":False, "test_ref_max":False }, - "uric_acid:{ + "uric_acid":{ "test_found":False, "test_value":False, "test_unit":False, "test_ref_min":False, "test_ref_max":False }, - "hba1c:{ + "hba1c":{ "test_found":False, "test_value":False, "test_unit":False, "test_ref_min":False, "test_ref_max":False }, - "systolic_bp:{ + "systolic_bp":{ "test_found":False, "test_value":False, "test_unit":False, "test_ref_min":False, "test_ref_max":False }, - "diastolic_bp:{ + "diastolic_bp":{ "test_found":False, "test_value":False, "test_unit":False, "test_ref_min":False, "test_ref_max":False }, - "height:{ + "height":{ "test_found":False, "test_value":False, "test_unit":False, "test_ref_min":False, "test_ref_max":False }, - "weight:{ + "weight":{ "test_found":False, "test_value":False, "test_unit":False, From 3831df2d909ad6b81e8e41ac4449616e4959db45 Mon Sep 17 00:00:00 2001 From: cobaltB12 Date: Sat, 20 Jan 2024 22:43:13 +0800 Subject: [PATCH 50/50] added RBC count --- streamlit_app.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/streamlit_app.py b/streamlit_app.py index 33749a16f116..bdc3d43abda2 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -56,6 +56,13 @@ "test_ref_min":False, "test_ref_max":False }, + "rbc_count":{ + "test_found":False, + "test_value":False, + "test_unit":False, + "test_ref_min":False, + "test_ref_max":False + }, "uric_acid":{ "test_found":False, "test_value":False,