Gemini Never completes on streamlit deployed website

After deploying, whenever I open my website it shows that is is continuously running and the page with the Google Gemini insights is the only blank page, so this leads me to believe that the AI api is causing some kind of issue. However there were no issues when run locally. What can I do to fix this?

In Treamlit you won’t set the API key publicly, so it’s necessary to include it in security

8 tips for securely using API keys

To begin, it is advisable to thoroughly debug the issue to identify the underlying cause rather than making assumptions. Implementing API timeouts and print statements for debugging purposes can aid in pinpointing potential issues. The error could be attributed to API keys, network connectivity problems, or other factors.

1 Like