Closed mochenyang closed 5 months ago
This repository is tracking the rsconnect R package. The rsconnect-python Python package is in the https://github.com/posit-dev/rsconnect-python repository.
That said, shinyapps.io does not support environment variables.
Related issues:
I'm trying to deploy a shiny app to Shinyapps.io using rsconnect-python and the following command:
rsconnect deploy shiny path/to/my/app --name my-acount-name --title my-app-name --environment OPENAI_API_KEY='my key'
Here,
path/to/my/app
is the directory that contains (1) anapp.py
script that makes use of OPENAI_API_KEY to call GPT models and (2) arequirements.txt
file containing the dependency. Locally, everything runs correctly. But when I push to Shinyapps.io, the app does not work with error message telling me that the OpenAI api key has not been set.Any advice would be much appreciated!