Inspiration
Last year I had to run to find blood for my sick family members. When faced with this issue, I saw that most developing countries including mine don't have proper blood donation network facilities. There may be hundreds of voluntary blood donor groups, but only a small percentage of them actually donate regularly. Hence I made Hemo, an AI Blood Health & Donation assistant.
What it does
Hemo has the following features
- Hemo helps you learn more about your blood report through open source AI language model. You can upload & chat with your report.
- If you run a blood donation center & need to analyze the blood donation pattern of your donors, Hemo can help you! You can upload a CSV file of the Blood Donation info & Hemo will automatically create a pairplot to visualize the blood donation patterns.
- Find nearby blood donation centers by just entering your current location & see them on the map.
How we built it
Hemo is built using streamlit & it is fully open source, as it does not use any OpenAI API & instead uses a free & open source language model Model Specs: Model Name: impira/layoutlm-doc-vqa Model Type: document-question-answering
I imported the model using hugging face transformers. Then I use streamlit to design the UI elements like input form & sidebar file upload.Firstly you can upload an image of your blood-test report. It has to be a jpg,png format. Then you can ask the Language Model questions about your report.
On the sidebar you can uplaod CSV data of patients blood donation history to create a plot of blood donation patterns. I used Pandas Library for prediction of blood patterns & uses streamlit to display the plot.
Finally donors can search for nearby donation centers. On the sidebar, their is option to enter your current location. I used Google Places API for this feature. You can enter your location (ex: New York) & it will show all available healthcare centers where you can donate blood within a 5 KM radius.
Challenges we ran into
This was my first time building a feature rich AI app using streamlit. Also I had '0' idea about using open source models. But I was kinda sick of having to create a new API key from OpenAI everytime I tried to build an AI app. So I forced myself to learn how Hugging Face AI open source models work. I used a smaller model. But it does the job just fine.I didn't have the Tesseract-OCR installed on my device which was necessary to convert the uploaded images into text as the model I used only excepts image files. So figuring that out & configuring Tesseract-OCR was a big challenge.
I have never used Google Places API before or any Google API for that matter. So figuring out how to use the API was a challenge. Specially on how to convert the text values into latitude & longtitude so the API could send back the right json response.
Accomplishments that we're proud of
I learned so much through this project. I feel very accomplished to have built my first ever AI web app using streamlit. I wouldn’t say the journey was easy.But if you keep at it, you can basically figure out any coding problem, that's what I learned.
What we learned
I learned about using streamlit's many awesome features. Specially the st.map & st.plot features which helped me visualize the data. Also learned many features of the Pandas Library which is the backbone of the blood donation pattern prediction.But most of all I learned a lot about open source LLMs, this project introduced me to the huge world of open-source LLMs.
What's next for Hemo
Ultimately Hemo aims to encourage the increase pf blood donation. Hemo aims to encourage people to donate their blood by informing & educating them on blood donation & transfusion methods. I also aim to use a more powerful open source LLM in the future like llama or Mistral so that Hemo can provide more expert level advice on your Blood Health.
Log in or sign up for Devpost to join the conversation.