Skip to content

gitmuhammedalbayrak/SimpleGeminiNote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

SimpleGeminiNote

This repository provides a simple example of how to use the Google Gemini API for content generation using Python. The notebook demonstrates how to configure the API, select a model, and generate text-based content based on a given prompt.

Requirements

  • Python 3.7 or higher
  • Google Generative AI Python SDK

Installation

To install the required packages, you can use pip:

pip install -q -U google-generativeai

Usage

  1. Clone this repository:
git clone https://github.com/yourusername/gemini-ai-content.git
  1. Navigate to the project directory:
cd gemini-ai-content
  1. Open the Jupyter Notebook (gemini_ai_content_generation.ipynb) and replace "GEMINI_API_KEY_HERE" with your actual Google Gemini API key.

  2. Run the notebook cells to generate content using the AI model.

Example

Below is a simple example of how the code works:

import google.generativeai as genai

genai.configure(api_key="GEMINI_API_KEY_HERE")

model = genai.GenerativeModel('gemini-pro')

response = model.generate_content(
    """
    Explain how AI works.
    """
)
print(response.text)

Contributing

Feel free to submit issues or pull requests if you have any improvements or suggestions.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

Sample for content generation using Google Gemini API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published