Skip to content

noclocks/demo-rshiny-assistant

 
 

Repository files navigation

Shiny app for using LLMs to create Shiny apps

Prequisites

This is a Shiny for Python application, so you will need Python installed on your system.

Get an Anthropic API key from Anthropic.

You can run this Shiny application locally on your computer, or you can deploy to a hosted service like shinyapps.io (Posit's managed cloud hosting service) or your own server running Posit Connect (Posit's hosting platform which you run on your own server).

Setup and usage

Install the required packages:

pip install -r requirements.txt

Create a file .env that contains your Anthropic API key:

ANTHROPIC_API_KEY="xxxxxxxxxxxxxxxxx"

You can also include these optional environment variables:

  • GOOGLE_ANALYTICS_ID - Google Analytics ID to use for tracking page views. If provided, the Google Analytics tracking code will be included in the app.

Run the app locally:

shiny run app.py

Deploying to a server

You can deploy this app to a server for others to access.

Learn about:

  • Deploying to the cloud with shinyapps.io
  • Deploying to a self-hosted server

Once you have your server set up, you can deploy the app with:

# Deploy (replace `gallery` with your server's nickname)
rsconnect deploy shiny -n gallery -t assistant .

About

LLM Chat Assistant for Shiny Applications

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 63.3%
  • JavaScript 28.4%
  • CSS 7.4%
  • HTML 0.9%