- User doesn't want to write SQL.
- User uploads CSV to inversql streamlit app
- User selects cells (that will be selected by the SQL).
- We overfit a
scikit-learnbinary decision tree on the data. - We decompose the tree, convert to boolean logic (explainable AI part).
- We simplify the logic with
sympy. - Generate SQL from previous steps (joins to JOIN and boolean to WHERE).
- User sees the SQL.
- User is happy.
| 🎬 Demo in a GIF | 🏛️ Architecture diagram |
|---|---|
Link to
live demo site
here.
|
|
For each individual SQL query candidate (the shortest one is displayed in the UI), we need to retrain a new decision tree.
But... The decision tree fitting is honestly fast, don't worry about this.
That's pretty much it!
If you have read this far, please consider giving me a star (⭐) or a fork (🍴).
This will keep my motivation going!
Or if you have too much cash at hand:
If you REALLY like my work, nowadays I'm working on
aioway, it's an optimizing compiler approach to deep learning, check it out!
Contribution welcome!
To contribute, refer to CONTRIBUTING.md, and our CODE_OF_CONDUCT.md.
Inspired by regexgen's process. Instead of regex we do SQL. Instead of selecting text we do select records. Decision tree is my inspiration tho.
