Health Lifestyle Nutrition Q&A: Question and Answer System Based on Google Palm LLM and Langchain for learning purpose
This is an end-to-end LLM project based on Google Palm and Langchain. I have build a Q&A system for Health, Lifestyle, and Nutrition related question answers.
- Langchain + Google Palm: LLM based Q&A
- Streamlit: UI
- Huggingface instructor embeddings: Text embeddings
- Annoy: Vector database
-
Clone this repository to your local machine using: git clone (https://github.com/data-pioneer/Question-Answer-Chatbot-LLM.git)
-
Install the required dependencies using pip: pip install -r requirements.txt pip install google-generativeai pip install InstructorEmbedding pip3 install sentence-transformers pip install annoy
-
Acquire an API key through makersuite.google.com and put it in the .env file GOOGLE_API_KEY="your_api_key_here"
-
Run the long chain implementation file by executing: Python langchain_imp.py
-
Run the Streamlit app by executing: streamlit run web_main.py
-
The web app will open in your browser.
- Now you are ready to ask questions. Type your question in the Question box and hit Enter
- What are the benefits of regular exercise?
- How many glasses of water should you drink per day?
- What is a balanced diet??
- web_main.py: The main Streamlit application script.
- langchain_imp.py: This has all the langchain implementation code.
- requirements.txt: A list of required Python packages for the project.
- .env: Configuration file for storing your Google API key.