Skip to content

This Streamlit app, powered by Toolhouse AI and OpenAI's LLM, generates Python code to transform data from one JSON format to another. It provides a description of the transformation function and verifies its correctness through automated unit testing.

Notifications You must be signed in to change notification settings

Boburmirzo/ai-data-transformation-code-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Data Transformation Code Generator

This Streamlit app, powered by Toolhouse AI and OpenAI's LLM, generates Python code to transform data from one JSON format to another. It provides a description of the transformation function and verifies its correctness through automated unit testing.

Features

  • Automatically generates Python transformation functions based on input and output JSON examples.
  • Provides detailed descriptions of how the function works.
  • Verifies the generated code by running unit tests.
  • Built with Streamlit for an easy-to-use interface.

Getting Started

You can run the Data Transformation Code Generator app locally or use optional setups like VS Code devcontainer or GitHub Codespaces.

Prerequisites

Run Locally

  1. Clone the repository:
git clone https://github.com/Boburmirzo/ai-data-transformation-code-generator.git
cd ai-data-transformation-code-generator
  1. Create a .env file in your project directory with the API Keys:
TOOLHOUSE_API_KEY=(key from https://app.toolhouse.ai/settings/api-keys)
OPENAI_API_KEY=(key from https://platform.openai.com)
  1. Install virtual environment (Preferred)
python3 -m venv env
source env/bin/activate
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Run the Streamlit app:
streamlit run streamlit_app.py

Open your browser and go to http://localhost:8501 to interact with the app.

Open in GitHub Codespaces

Click here to open in GitHub Codespaces

Open in GitHub Codespaces

Open in Dev Container

Click here to open in Dev Container

Open in Dev Container

About

This Streamlit app, powered by Toolhouse AI and OpenAI's LLM, generates Python code to transform data from one JSON format to another. It provides a description of the transformation function and verifies its correctness through automated unit testing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages