https://github.com/walterpinem/gemini-api-streamlit
Testing Gemini AI Models with Streamlit
https://github.com/walterpinem/gemini-api-streamlit
ai ai-chat ai-tools gemini gemini-ai gemini-api python python-3 python-script python3 streamlit streamlit-application streamlit-webapp
Last synced: 7 months ago
JSON representation
Testing Gemini AI Models with Streamlit
- Host: GitHub
- URL: https://github.com/walterpinem/gemini-api-streamlit
- Owner: walterpinem
- Created: 2025-03-04T15:08:54.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-03-04T15:30:57.000Z (7 months ago)
- Last Synced: 2025-03-04T16:36:03.545Z (7 months ago)
- Topics: ai, ai-chat, ai-tools, gemini, gemini-ai, gemini-api, python, python-3, python-script, python3, streamlit, streamlit-application, streamlit-webapp
- Language: Python
- Homepage: https://walterpinem.com/gemini-ai-api/
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A Simple Python Streamlit App for Testing Gemini AI Models
Testing Gemini AI Models using Streamlit with a simple interface.
#### Simple usage:
`streamlit run main.py`
---
Here’s how you can get things rolling:#### **1\. Create a Python Virtual Environment**
Open your terminal (or Command Prompt on Windows) and navigate to your project directory. Then run:
##### Windows & Mac
python -m venv gemini_env
Activate it by running:
**On Windows:**
gemini_env\Scripts\activate
**On macOS/Linux:**
source gemini_env/bin/activate
For more detailed cover up, learn my post about [**Python virtual environment**](https://walterpinem.com/python-virtual-environment/).
#### **2\. Install Required Packages**
With your virtual environment activated, install Streamlit and [**OpenAI Python SDK**](https://github.com/openai/openai-python) as Gemini AI API is compatible with OpenAI (as well as any other dependencies you need) using `pip`:
pip install streamlit openai
This will install the Streamlit framework, which we use to build our interactive web app, and the OpenAI package, which is required to interact with the Gemini AI API.
#### **3\. Prepare the Project Structure**
Organize your project directory so that you have all the necessary files in place:
gemini-ai-chat-app/
├── main.py
└── logo-white.png
You can change the logo name or even remove it.