A modern web application built with Streamlit that allows users to paste URLs, extract embeddings from the content, and use a Retrieval-Augmented Generation (RAG) approach to answer user questions based on the articles' content.
- URL Input: Paste up to 3 URLs to extract content.
- Embedding and RAG: Generate embeddings for the articles and use RAG for enhanced question answering.
- Hugging Face Integration: Leverage models from Hugging Face for embeddings and language modeling.
- Local Model Alternative: Option to use local models like Ollama Mistral.
- User-Friendly Interface: Simple and intuitive Streamlit-based UI.
-
Clone the Repository:
git clone https://github.com/PrakharMishra531/AI-powered-article-QnA cd your-repo
-
Create and Activate Virtual Environment:
python -m venv env source env/bin/activate # On Windows use `env\Scripts\activate`
-
Install Dependencies:
pip install -r requirements.txt
-
Set Up Environment Variables: Create a
.env
file and add your Hugging Face API token and other necessary configurations.HUGGINGFACE_API_KEY=your_api_key_here
-
Run the Streamlit App:
streamlit run app.py
-
Interact with the Application:
- Open the web browser at the provided local URL.
- Paste up to 3 URLs.
- Ask questions and get answers based on the content of the URLs.