The InvestWiser Robo-Advisor Questionnaire is a web-based application that helps users receive personalized investment advice based on their input. The application collects various details such as age, occupation, annual income, investment horizon, and other investment-related information to generate customized investment advice.
- Collects user information through a questionnaire form
- Provides personalized investment advice based on user input
- Simple and clean user interface
- Uses OpenAI API to generate investment advice
- Python
- Flask
- HTML
- CSS
- OpenAI API
investment_advisor/
├── app.py
├── templates/
│ └── index.html
└── static/
└── style.css
-
Clone the repository:
git clone https://github.com/GENTLEWIL/Yuyang_FinTech.git cd Yuyang_FinTech
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required packages:
pip install flask requests jinja2 pip install openai pip install flask openai pip install flask openai pylint pip install openai --upgrade
-
Set up the OpenAI API key: Please set up a real OpenAI API, which has been uploaded on Canvas :D Meanwhile, please pay attention: The code has been updated using the
openai migrate
command to use the latest version of the OpenAI API. At first, the initialization part of OpenAI client with API key is:import openai openai.api_key = 'API-key-holder'
After implementing
openai migrate
command, the code will be updated to:from openai import OpenAI client = OpenAI(api_key='API-key-holder')
-
Run the application:
python app.py
-
Open your web browser and go to
http://127.0.0.1:5000
.
- Fill out the questionnaire form with the required information.
- Submit the form to receive personalized investment advice.
- Review the investment advice generated based on your input.
If you have any questions, please reach out to [[email protected]].