Skip to content

A web-based application that provides AI assistance for investment planning using the Gemini API for intelligent financial insights and deployed seamlessly on Streamlit Cloud for easy access and user interaction.

Notifications You must be signed in to change notification settings

Freya135/AI-Investment-Assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Investment Planner using Google Gemini & Streamlit

This is an AI-powered Investment Planner built using Google Gemini (Generative AI API) and Streamlit for the UI. It helps users build a customized investment plan based on their financial goals, risk tolerance, income, and investment horizon.

Features

  • Personalized investment plans based on user input
  • Secure API key input (supports .streamlit/secrets.toml or manual entry)
  • Uses Gemini (gemini-pro or gemini-1.5-pro) for generating financial advice
  • Stylish and responsive dark UI
  • Investment allocation, important considerations, and disclaimers
  • Safe error handling for API, JSON parsing, and model selection

Technologies Used

Setup Instructions

1. Clone the Repository

git clone https://github.com/Freya135/AI-investment-Assistant.git

2. Create a Virtual Environment

python -m venv venv
source venv/bin/activate  # or `venv\Scripts\activate` on Windows

3. Install Dependencies

pip install -r requirements.txt

4. Add Your Google API Key

You have two options:

Option A: Add to secrets.toml (recommended)
Create a file .streamlit/secrets.toml with:

GOOGLE_API_KEY = "your_google_api_key"

Option B: Enter it manually in the app when prompted.

Running the App

streamlit run investment_planner.py

Then open http://localhost:8501 in your browser.

How It Works

  • You enter your financial details (goal, income, debt, risk appetite, etc.)
  • The app formats this into a structured prompt.
  • The Gemini API generates a JSON-formatted investment plan.
  • The app parses the JSON and displays it beautifully using Streamlit components.

Example Output

{
  "Understanding Your Situation": "...",
  "Investment Options & Potential Allocation": "...",
  "Important Considerations": "...",
  "Disclaimer": "I'm an AI chatbot, not a financial advisor..."
}

Disclaimer

This tool is intended for educational purposes only. It does not replace professional financial advice. Always consult a certified financial planner for real investment decision

About

A web-based application that provides AI assistance for investment planning using the Gemini API for intelligent financial insights and deployed seamlessly on Streamlit Cloud for easy access and user interaction.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages