This is a simple example for using Google Gemini AI models using their API for Educational and Research purposes.
These instructions will get your copy of the project up and running on your local machine.
- Google API Console account and a project
- Google API Key for Generative Language Models
- Git
- Python
- Jupyter Notebook
-
Create a Project in Google API Console
Create a new project in the Google API Console to use the Google Generative Language Model API. -
Enable Google Generative Language Model API
Enable the Google Generative Language Model API for your project in the Google API Console. -
Create an API Key for Gemini in AI Studio
Generate an API key in AI Studio under the Gemini project. -
Copy the API Key
Securely copy the generated API key. -
Clone/Fork the GitHub Repository
Clone or fork this repository to your local machine. -
Add Your API Key to
credentials.ini
Add your API key to thecredentials.ini
file in the cloned repository.
[API_KEY]
google_api_key = #PASS YOUR API KEY HERE
-
Create the Environment
Set up the Python environment. Note: Platform-specific libraries might cause errors. Provided environment file is exported from a Linux Environment. -
Execute the Jupyter Notebook
Run Jupyter Notebook and navigate to the project notebook.