jupyter-text2code  by deepklarity

Jupyter extension for natural language to Python code conversion

created 4 years ago
2,092 stars

Top 21.9% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project provides a Jupyter extension that translates natural language queries into Python code, aiming to simplify data analysis for users. It offers a proof-of-concept for integrating natural language processing directly into the notebook environment.

How It Works

The extension leverages a pipeline that includes intent detection and named entity recognition (NER) to understand user queries. It utilizes SentenceTransformers (specifically paraphrase-MiniLM-L6-v2) for semantic understanding and can generate code snippets for common data analysis tasks, including pandas commands and integrations with popular libraries.

Quick Start & Requirements

  • Install via pip: pip install . after cloning the repository.
  • CPU-only install requires export JUPYTER_TEXT2CODE_MODE="cpu".
  • GPU install requires sudo apt-get install libopenblas-dev libomp-dev.
  • Requires Jupyter Notebook.
  • Initial setup involves downloading the Universal Sentence Encoder model.
  • Docker images (CPU: 1.51 GB, GPU: 2.56 GB) are available on Docker Hub.
  • Demo Video: https://github.com/deepklarity/jupyter-text2code

Highlighted Details

  • Converts English queries into Python code within Jupyter.
  • Supports pandas commands and snippet insertion for popular integrations (e.g., Twitter, Instagram).
  • Uses SentenceTransformers paraphrase-MiniLM-L6-v2 for model evaluation.
  • Offers Docker images for easier deployment.

Maintenance & Community

Authored by Deepak Rawat, Kartik Godawat, and Abdullah Meda. The project has a TODO list including adding Ollama support for local LLMs and improving intent detection.

Licensing & Compatibility

The repository does not explicitly state a license in the provided README.

Limitations & Caveats

The project is described as a proof-of-concept. Windows support is listed as a future TODO item. The README mentions a previous plugin name "mopp" which may require uninstallation before installing the current version.

Health Check
Last commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
1 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.