
Shiny Assistant - Prototype Shiny for Python Apps with AI
Ryan Johnson walks through how to use Shiny Assistant, an AI-powered tool for Shiny for Python app development. Learn how to quickly create and interact with a Shiny app based on your own description. Shiny Assistant is a powerful tool for rapid prototyping and iteration. You can also ask it questions about how to use Shiny. Shiny Assistant: https://gallery.shinyapps.io/assistant/ Learn more: * Shiny for Python: https://shiny.posit.co/py/ * The potential for AI-powered Shiny app prototyping with Shiny Assistant: https://posit.co/blog/ai-powered-shiny-app-prototyping/ * TidyTuesday project: https://github.com/rfordatascience/tidytuesday * Posit PydyTuesday GitHub repo: https://github.com/posit-dev/python-tidytuesday * Other videos in this PydyTuesday playlist: https://www.youtube.com/playlist?list=PL9HYL-VRX0oSDQjicFMLIIdcLv5NuvDp9 #pythoncontent
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.

