Skip to content

About

Deployment stack for PlotCraft, a Qwen2.5-3B assistant that generates Python visualization code with Gradio, FastAPI, Docker, tests, and CI/CD.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

title PlotCraft
sdk gradio
sdk_version 6.28.0
python_version 3.12
app_file app.py
models
PlotCraft
short_description Generate Python visualization code from natural language.

PlotCraft

CI Deployment

PlotCraft is a fine-tuned Qwen2.5-3B assistant that converts natural-language requests into executable Python visualization code. This repository contains the Gradio application, FastAPI service, Docker configuration, automated tests, and GitHub Actions deployment pipeline.

Try the live ZeroGPU demo

Generated code is displayed for review and can be rendered as a PNG inside an isolated browser worker. Generated code is never executed on the server.

Use the live application

  1. Open the live demo.
  2. Describe the Python visualization you want.
  3. Select Generate Python Code.
  4. Review the generated Python code.
  5. Select Render Preview to display the chart in the browser.
  6. Copy the code if you want to use it in your own project.

Example request:

Create a Matplotlib bar chart with categories A, B, C and values 2, 5, 3.

Run locally

Create and activate a virtual environment in Git Bash:

python -m venv .venv
source .venv/Scripts/activate

Install the dependencies and start the application:

pip install -r requirements.txt
python app.py

Local execution uses the lightweight mock mode by default, so it does not download the production model.

Run the tests with:

python -m pytest

Run the API with Docker

Build and start the container:

docker compose up --build

Open the interactive API documentation at:

http://localhost:8000/docs

Available endpoints:

  • GET /health checks whether the service is running.
  • POST /generate accepts a prompt and returns generated Python code.

Stop the container with:

docker compose down

About

Deployment stack for PlotCraft, a Qwen2.5-3B assistant that generates Python visualization code with Gradio, FastAPI, Docker, tests, and CI/CD.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages