Giter VIP home page Giter VIP logo

ai_therapist's Introduction

Personalized Life Consultant

Utilize natural language processing and machine learning to obtain personalized life consulatation reports. Leverage the txtai library for semantic search and the GPT-4 engine for dynamic suggestions.

Running main.py and EDA.py

To run the Python file and generate a personalized life consultation report or EDA, follow the steps outlined below:

Installation and Setup

Ensure Python 3.x is installed. Download it from the Python official website.

Step 1: Clone the Repository

gh repo clone William-Ger/AI_Therapist

Step 2: Install the Dependencies

Navigate to the project directory and run:

pip install pandas txtai openai seaborn matplotlib

Step 3: Configure OpenAI API Key

Open the script file and set your API key:

openai.api_key = 'YOUR-OPENAI-API-KEY-HERE'

Step 4: Run the Script

Execute the Python script via terminal or command prompt:

python path/to/your_script.py

Step 5: Input Details

Follow the terminal prompts to provide your lifestyle details and improvement areas.

Step 6: Access Your Report

The script will create a personalized report as a markdown file. Find it in the output directory.

Tip: Convert the markdown file to PDF using the 'Markdown PDF' extension by yzane in VSCode.

Features

  • Semantic Search: Utilizes txtai for in-depth analysis.
  • GPT-4 Integration: Leverages GPT-4 for dynamic suggestion creation.
  • Report Generation: Creates comprehensive PDF reports.

Exploratory Data Analysis (EDA)

The EDA facilitated a robust understanding of the dataset, identifying pivotal factors affecting life expectancy. Key steps included data cleaning, visualization, and feature engineering, providing a rich foundation for semantic analysis and report generation.

EDA Insights

Key Insights

  1. Bimodal Distribution: Factors exhibit a bimodal distribution of effects on life expectancy.
  2. Scientific Backing: Strong scientific backing often indicates negative life expectancy impacts.
  3. Sex-Based Differences: Different factors disproportionately affect various sex categories, highlighting the dataset's depth.

For detailed insights and analysis, refer to the eda folder in the repository.

Conclusion

The EDA process was pivotal in shaping the development of the application by providing a clear understanding of the dataset's structure and the relationships between different factors. It served as the foundation upon which the semantic analysis and report generation functionalities were built.

We encourage contributors and users to delve into the EDA process to garner a deeper understanding of the data and the initial analysis carried out in this project.

Special Thanks

I extend gratitude to:

  • Joakim Arvidsson for creating the invaluable dataset that serves as the backbone of this project, aiding in the generation of factors using sematic search. The kaggle dataset can be found here: https://www.kaggle.com/datasets/joebeachcapital/life-longevity-factors?datasetId=3656167
  • The creators of txtai for developing a potent semantic search library that significantly enhanced the project's analytical depth.
  • The team at OpenAI for crafting the GPT-4 engine, a cornerstone in the dynamic suggestion generation feature of this project.

Your contributions have been instrumental in bringing this project to fruition.

License

Use this repo however you want. I would love to see how people can improve the accuracy of the report and functionality of the tool.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.