This application uses a Retrieval-Augmented Generation (RAG) approach to provide insights from World Bank data and GEM reports. It leverages Hugging Face's embeddings and language models, and integrates with Streamlit for user interaction.
- Fetches World Bank data for Brazil and global statistics on poverty, internet usage, and unemployment.
- Retrieves and processes GEM reports in PDF format.
- Uses Hugging Face's embeddings and language models for text-based queries.
- Provides a web interface for querying and interacting with the processed data.
- Python 3.7 or higher
requests
- For fetching data from APIspypdf
- For extracting text from PDF reportspandas
- For data handling (optional, if needed)streamlit
- For the web interfacelangchain
- For handling text and embeddingshuggingface_hub
- For interacting with Hugging Face models
- Clone this repository:
git clone https://github.com/yourusername/RAG.git cd RAG
- Install the required packages
pip install -r requirements.txt
- Set up your Hugging Face API token:
Replace HUGGINGFACEHUB_API_TOKEN in app.py with your actual API token.
- Fetch World Bank data and GEM report:
python datafetcher.py
- Run the Streamlit app.
streamlit run app.py