The goal in this demo is to make and publish a simple chatbot that creates Google Calendar links from text prompts.
The idea for the app is to have similar functionality to a GPT I made on ChatGPT, but using open-source resources.
Make a new GitHub repo
Get content to base code upon
Determine what your basic LLM code is going to be. Go back and forth with the prompts in the playground until you get the output from the LLM that you want.
Get the sample code onto the Clipboard
Make this file with your API key
This file sets up the appearance in Streamlit
Write your code
I am using Cursor and its Composer feature that will write code from prompts. I also have set Cursor to reference the Streamlit docs since I want it to know Streamlit better.
Ctrl-i to invoke Composer
Run your app in localhost.
There may be errors and updates. Go back and forth with Composer.
Make requirements.txt so libraries get loaded when published
GitHub
Make sure .secrets.toml is ignored in Git
Update your GitHub repo. I use GitHub desktop.
Deployment
When running the app in localhost, there will be a Deploy button
Copy the contents of secrets.toml in the Advanced dialog
Deployment takes a few moments…
Test live app
In share.streamlit.io set your app so it is public.