A simple Streamlit app that shows how to build a chatbot using Google's Gemini Models.
- A GitHub account
- A Gemini API key
- A Google Cloud Platform account
- A Streamlit Cloud account
- Python 3.8 or higher installed on your machine
- Git installed on your machine
-
Install the requirements
$ pip install -r requirements.txt -
Create an .env file with the following fields for your local environment. (Dont forget to add this to your .gitignore file as you dont want your API key to be public)
GEMINI_API_KEY=*** //enter your API key here SYSTEM_PROMPT="***" //enter what the prupose of your bot is GEMINI_MODEL="***" //enter the model you chose from the list above BOT_NAME="***" //enter the bot's name here -
Run the app
$ streamlit run streamlit_app.py
Note:
You can also run the app using the command streamlit run streamlit_app.py --server.port 8501 to use a different port.
Once you run the app, you can start chatting with the bot!
The option to deploy the app on the web is not available yet. If you want to deploy it on the web, you can use streamlit cloud once you've linked it to your GitHub account.