Skip to content

ChatGPT connected to a Python terminal and dataset, for automated data science

Notifications You must be signed in to change notification settings

Magnushhoie/VisualizeYourGPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License

VisualizeYourGPT

VisualizeYourGPT

What is VisualizeYourGPT?

  • Connect ChatGPT (GPT-3.5 or GPT-4.0) to a Python terminal and your dataset
  • Let it reason about new hypotheses, execute code and summarize findings in a Jupyter notebook
  • It's free: Just login to ChatGPT through your browser, no API key is needed
  • Nb: No code will run without confirmation, unless automatic mode is set
# Download and install
git clone https://github.com/Magnushhoie/VisualizeYourGPT/
cd VisualizeYourGPT

# Install requirements
pip install -r requirements.txt

# Setup ChatGPT, and login through the Playwright browser
chatgpt install

# Run on example dataset
python gpt.py --csv_file data/data.csv

# Nb: You can edit the choice of prompts in your_prompts.py

Requirements

Example workflow:

  1. Introduce context and give dataset description (automatic)
  2. Option 6: "6: Run a quantitative only data analysis to support the question."
  3. Let GPT output code, run it and return output, then ask to summarize findings
  4. Option 7: "7: Graph 1-2 supporting figure(s)."
  5. Let GPT output code, run it and return output, then ask to summarize findings
  6. Option 5: "5: Pick a scientific question and plan how you decide to tackle it"
  7. Repeat steps 2-5.

Visualizing graphs in the terminal (MacOS)

# Install itermplot https://github.com/daleroberts/itermplot
pip install itermplot==0.5

# Set these settings in your terminal before running gpt.py (recommend NOT putting in .bashrc)
# Use itermplot for Matplotlib plotting
MPLBACKEND="module:https://itermplot"
# Dark theme
ITERMPLOT=rv

Documentation

USAGE:     python gpt.py --csv_file <FILE> --model <MODEL>

    Examples:

    # Run VisualizeYourGPT on pre-processed dataset 'data.csv'
    python gpt.py --csv_file data/data.csv

    # Output notebook, insights and script stored in output/

Connect dataset and executable Python script to ChatGPT

optional arguments:
  -h, --help           show this help message and exit
  --csv_file CSV_FILE  Input, pre-processed dataset (CSV file)
  --model MODEL        ChatGPT model to use (legacy-free, legacy-paid, gpt4)
  --simulate           Simulate ChatGPT responses
  -v, --verbose        Verbose mode

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

ChatGPT connected to a Python terminal and dataset, for automated data science

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published