This Streamlit app is not just any chatbot; it's your starter kit to play with Snowflake's brand new foundation model: Snowflake Arctic! Arctic was released on April 24, 2024 and is completely open-source 😍
Get the full lowdown on Arctic in Adrien Treuille's blog post. Snowflake Arctic is also available via Hugging Face 🤗 and all your favorite model gardens soon! 🔜
Built a cool Streamlit app using Arctic? Share it on social media with #SnowflakeArctic! We'll repost you 🫡
To use this app, you'll need to get your own Replicate API token.
After creating a Replicate account, you can access your API token from this page.
Clone this repository
git clone https://github.com/yourusername/snowflake-arctic-chatbot.git
cd snowflake-arctic-chatbot
Install requirements
pip install -r requirements.txt
Add your API token to your secrets file\
Create a .streamlit
folder with a secrets.toml
file inside.
mkdir .streamlit
cd .streamlit
touch secrets.toml
Use your text editor or IDE of choice to add the following to secrets.toml
:
REPLICATE_API_TOKEN = "your API token here"
Learn more about Streamlit secrets management in our docs.
Alternatively, you can enter your Replicate API token via the st.text_input
widget in the app itself (once you're running the app).
Run the Streamlit app
Note: there are two versions of the app included in this repo. simple_app.py
is a simpler app which passes user input to Arctic and returns Arctic's response. streamlit_app.py
has built-in guardrails, meaning that it checks user input to ensure queries are safe (i.e. users are not asking Arctic for instructions on how to commit illegal activity, etc.).
To run the version of the app that includes guardrails, enter:
cd ..
streamlit run streamlit_app.py
To run the simpler version of the app, enter:
cd ..
streamlit run simple_app.py
Host your app for free on Streamlit Community Cloud. These instructions are also available in our docs.
streamlit_app.py
on GitHub. Securely store your Replicate API token with Community Cloud's secrets management feature. These instructions are also available in our docs.
REPLICATE_API_TOKEN = "your API token here"
Need help? Got a burning question or a spark of genius to share? Just open an issue in this repository.