/convesational_ai

Conversational AI application built using LangChain, Llama2 and Streamlit

Primary LanguageHTMLMIT LicenseMIT

Convesational AI

Conversational AI application: Chat with your documents 📚 using Llama2 🦙, AWS SageMaker 🧠, LangChain 🦜️🔗 and Streamlit 🔥

Running this application

  1. Clone this repo ⏬

    git clone https://github.com/vas610/convesational_ai.git
    
    cd convesational_ai
  2. Create conda 🐍 environment

    conda env create -f environment.yml python=3.10  # conda 22.9.0
    
    conda activate docai
    
    pip install -r requirements.txt
    
    python -m ipykernel install --user --name=conda_docai
  3. Download required data 🔠

    wget --quiet https://docs.aws.amazon.com/sagemaker/latest/dg/sitemap.xml --output-document - | egrep -o "https://[^<]+" | wget --directory-prefix=./aws_docs/sagemaker/ -i -
  4. Create and Store Embeddings 1️⃣0️⃣

    ./dataprep.py
  5. Setup a SageMaker Endpoint with Llama2 🦙 by following this blog. I have used the meta-textgeneration-llama-2-7b-f model . Also, update the endpoint name in the .env file

  6. Run the below command to start the streamlit app 🔥

    streamlit run streamlit_app.py --server.address 0.0.0.0 --server.port 8080 --server.fileWatcherType none --browser.gatherUsageStats False
2023-07-30_13-22-58-3.mp4