Core Logic and Library Choices
MediMind’s core logic combines the strengths of a pre-trained RNN for rapid initial disease prediction and an LLM for interactive diagnosis refinement and recommendation generation.
Workflow:
Symptom Input: The user inputs their symptoms via a chat interface.
RNN-based Prediction: The RNN model processes the symptoms and provides an initial disease prediction.
LLM-based Follow-up: The LLM generates follow-up questions to gather more information.
User Interaction: The user answers the follow-up questions.
Final Diagnosis: The LLM integrates the initial prediction, user input, and follow-up answers to provide a refined diagnosis.
Recommendation Generation: The LLM generates treatment and prevention recommendations based on the refined diagnosis.
Output: The final diagnosis and recommendations are presented to the user.
Key Libraries:
Streamlit: For creating the web application’s user interface.
PyTorch: For building and deploying the RNN model.
Transformers: For using the Large Language Model (LLM).
Scikit-learn: For data preprocessing and the TF-IDF vectorizer.
NLTK: For text processing tasks such as tokenization and stemming.
Pandas: For data manipulation.