Skip to content

pyvista/pyvista-ai

Repository files navigation

pyvista-ai

All Contributors

pyvista-ai is a Python library that leverages AI to automatically adjust PyVista's Plotter settings. By entering a prompt, you can easily apply visually optimal plot configurations.

Features

  • AI-powered automatic configuration: Optimizes pyvista.Plotter settings based on user prompts
  • Customizable: Automatically adjusts background color, window size, lighting settings, and more
  • Simple API: Intuitive operations for adjusting 3D visualizations

Installation

pip install pyvista-ai

Usage

Basic Example

import asyncio
import pyvista as pv
from pyvista_ai import PlotterAgent

agent = PlotterAgent(model="gemini:pro")

async def main() -> None:
    plotter = await agent.run("Enhance realistic shading and display in widescreen mode")
    return plotter.show()

asyncio.run(main())

Required Environment Variables

To use pyvista-ai, you need to set the GEMINI API key as an environment variable.

export GEMINI_API_KEY="your-api-key-here"

Future Plans

  • Support for offline AI models: Integration with Hugging Face Transformers for local AI model support
  • GUI Integration: Compatibility with PyQt and Streamlit
  • Additional Features: AI-assisted optimal camera angles and automatic mesh color selection

License

MIT License

Contribution

Bug reports and feature suggestions are welcome via GitHub Issues. Pull requests are also highly encouraged!

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Tetsuo Koyama
Tetsuo Koyama

📖 🚧 🤔
All Contributors
All Contributors

📖
pre-commit-ci[bot]
pre-commit-ci[bot]

🚧

This project follows the all-contributors specification. Contributions of any kind welcome!

About

Agent Framework / shim to use PyVista with LLMs

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published