Skip to content

krys2fa/rt-rag-chatbot-assistant

Repository files navigation

Ghana Investment Insights Portal

This portal helps investors, analysts, and policymakers explore Ghana's economic landscape using official Bank of Ghana reports. Ask about sector performance, macroeconomic indicators, or regulatory changes. All answers are grounded in the latest uploaded report.


Screenshots

Portal Home

Sample Q&A

Demo

Live Link: https://ghana-investment-insights.streamlit.app/


Features

  • Upload and analyze official Bank of Ghana PDF reports
  • Ask questions about Ghana's economy, sectors, or regulations
  • Get answers grounded in real, up-to-date data
  • Clean, business-focused web interface (Streamlit)
  • Persistent vector search with ChromaDB

Project Structure

RAGchatbot/
├── app.py                # Streamlit UI (Ghana Investment Insights Portal)
├── requirements.txt      # Python dependencies
├── .env                  # For your GROQ_API_KEY
├── data/                 # Place your Bank of Ghana PDF here
├── screenshots/          # App screenshots
├── src/
│   ├── main.py           # Core pipeline: PDF ingestion, embedding, retrieval

Installation

  1. Clone the repository
  2. Install dependencies:
    pip install -r requirements.txt
  3. Set up your environment:
    • Copy .env_example to .env and add your Groq API key:
      GROQ_API_KEY=your-groq-api-key-here
    • Place your Bank of Ghana PDF in the data/ folder (e.g., Summary-of-Economic-and-Financial-Data-May-2025.pdf).

Usage

Local Development

Start the portal:

streamlit run app.py

Open the local URL in your browser. Type your question and click "Get Insights". The portal will answer using only the uploaded Bank of Ghana report.

Cloud Deployment

This app is ready for deployment on Streamlit Cloud:

  1. Push to GitHub with your code (excluding .env)
  2. Connect to Streamlit Cloud at https://share.streamlit.io/
  3. Add your GROQ_API_KEY in the Streamlit Cloud secrets manager
  4. Deploy - the app includes runtime.txt and sqlite compatibility fixes for Cloud

Note: The app includes automatic sqlite3 compatibility handling for Streamlit Cloud's managed environment.


Example Questions

  • What sectors are growing fastest in Ghana?
  • What is the current inflation rate?
  • What are the latest trends in the banking sector?

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages