ChatGPT-like Streamlit chatbot & Simple image generator (DALLE3) OpenAI Using supabase as database.
- streamlit
- openai
- st-supabase-connection
Type below:
>>> git clone [THE_REPO_URL]
>>> pip install -r requirements.txt
>>> streamlit hello
Then, make .streamlit directory and put secrets.toml into it and copy below:
# .streamlit/secrets.toml
OPENAI_API_KEY=
[connections.supabase]
SUPABASE_URL =
SUPABASE_KEY =
Finally, type streamlit run main.py
to show the result. Browser will pop up and you can play it.
It is good practice to read following docs and articles to know the basic of using and making streamlit app.
These help me a lot to develop streamlit application.
- Build a basic LLM chat app
- Creating an image generator with streamlit and replicate api by arjunaraneta
If this error shows:
httpcore.ConnectError: [Errno 11001] getaddrinfo failed
That means you need to restore your database. Go to the supabase dashboard to restore it, then it will work like a charm as usual!
If you don't use Supabase a couple of days, you can't connect with it because it suspends the project. Of course, if you are using the Supabase in free, as i am.