Resources

Shiny Assistant - Prototype Shiny for Python Apps with AI

video
Mar 24, 2025
2:04

image: thumbnail.jpg

Transcript#

This transcript was generated automatically and may contain errors.

Shiny Assistant is an AI-powered tool for Shiny app development. In this video, we'll demonstrate how to use it to build a Shiny for Python application and then run it within the Positron IDE. Shiny Assistant is available at this URL and features a user-friendly chat for asking anything about Shiny.

Let's say you want to create a Shiny for Python-powered dashboard, but not sure where to start. Let's ask Shiny Assistant to create a simple interactive dashboard with a few plots and a table. Once we input our request, Shiny Assistant moves the prompt to the left sidebar and begins generating the application. Simultaneously, we see an instance of Shiny live open, which will allow us to run and modify the application directly in our web browser.

And here is the AI-generated Shiny for Python dashboard from Shiny Assistant, featuring two plots, a table, and interactive inputs. Let's take the code and copy it to an app.py file within a new Python project in Positron. Before we can run the application, we need to install the necessary packages, including Shiny, NumPy, Pandas, and matplotlib.

Setting up the environment in Positron

To install these packages, we'll open the terminal and run pip install followed by the package names. We also want to install the Shiny extension, which we can do by clicking the extensions button on the left, searching for Shiny, and clicking install. Now that our environment is set, we can run the application by clicking the play button. And here it is, our Shiny Assistant created dashboard, now running within Positron.