A visually modern, creative desktop demo app (by Bobby Azad) showing how LLMs can make data analysis conversational. Users paste or load CSV/TSV/tabular data, ask natural language questions ("Convert this to JSON", "Find the correlation between x and y column", etc), and get instant answers via OpenAI API. Built with PyQt6 for an interactive, professional UI.
- Paste or load any CSV/TSV/text data (from file or clipboard)
- Clean chat interface: ask any data question and get an AI-powered response
- Conversation history maintained in a modern, resizable UI
- Supports code/text output (JSON, summaries, stats, etc)
- UI and logic cleanly separated; robust error handling
1. Install pixi (if you haven’t already)
pip install pixi # or see pixi docs for latest install command
git clone https://github.com/gbazad93/llm-graphical-chatbot
cd <your-repo-folder>
If you already have a pixi.toml
file (shared or in this repo):
pixi install
This will create a new environment with all required dependencies (see pixi.toml).
You can store your API key in a .env
file in the project root (where the main .py
file is):
OPENAI_API_KEY=sk-...your-openai-api-key...
However, for improved security, we recommend storing your API key as a system environment variable.
On Windows:
Open a command prompt window and run:
setx OPENAI_API_KEY "<your-openai-api-key>"
To verify it's set, open a new command prompt and run:
echo %OPENAI_API_KEY%
On Linux or macOS:
Add the following line to your ~/.bashrc
, ~/.zshrc
, or appropriate shell config file:
export OPENAI_API_KEY="sk-...your-openai-api-key..."
Then reload your shell or run:
source ~/.bashrc # or source ~/.zshrc
You can check the variable with:
echo $OPENAI_API_KEY
pixi run python main.py
(Handled automatically by pixi install)
- Paste or load a CSV file into the left panel.
- Type a question like
What is the correlation between Price and Sales?
. - Click Send. The AI will analyze the data and show the result in the chat window.
- Update
MODEL
in the code to use a different OpenAI model if desired. - All UI colors/styles are defined in
styles.py
method in the code for easy theming.
- Demo and concept by Bobby Azad
- Built using PyQt6 and OpenAI API