Git Product home page Git Product logo

google_gemini's Introduction

Google's Gemini API Integration

FastAPI interface to interact with Google's Gemini generative AI models.

Key Features:

  • Text Generation: Generate creative text formats. based on your input query.
  • Image-To-Text Generation: Generate creative images explaination inspired by your image prompt.
  • Fast and Easy: Designed for effortless exploration and integration with other projects.
  • Clean and Documented Code: Well-organized code with detailed comments for clear understanding.

Requirements:

  • Python 3.7+
  • requirements.txt

Getting Started:

  1. Clone this repository.
  2. Install the required dependencies: pip install -r requirements.txt.
  3. Set your Google Cloud Platform API key as an environment variable named GEMINI_API_KEY.
  4. Run the server: uvicorn main:app --host 0.0.0.0 --port 8000.
  5. Open http://localhost:8000 in your browser.

API Documentation:

https://ai.google.dev/models/gemini

Text Generation:

  • Endpoint: /gemini
  • Method: GET
  • Parameters:
    • query: Text prompt for the model to generate (required).
  • Example: http://localhost:8000/gemini?query=Write a poem about a starry night sky

Image-To-Text Generation:

  • Endpoint: /gemini/img
  • Method: GET
  • Parameters:
    • query: Image prompt for the model to generate Text(required).
    • image_url: URL of the reference image (required).
  • Example: http://localhost:8000/gemini/img?query=Explain This Image&image_url=https://example.com/mountain-forest.jpg

Contributing:

We welcome contributions! Feel free to fork this repository, make improvements, and submit pull requests. Read the CONTRIBUTING.md file for guidelines.

License:

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

We hope you find Google_Gemini useful and inspiring!

Note:

  • Use Google Cloud Platform API key.

google_gemini's People

Contributors

anamolz avatar rajaulansari avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.