Skip to content

he-end/gem-flash-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Cloud ( Gemini ) flash-image

USING CLI

setup

  •   chmod +x build
  •   ./build
  •   ./gemCLI

note

if you don't have an API KEY, you can create an API here.

RUN

  • example
    ./gemCLI -p "generate image cat fly to the moon"
    ./gemCLI -p "generate image cat fly to the moon" -o output_name
    ./gemCLI -p "generate image cat fly to the moon" -o output_name -d directory_to_save
    ./gemCLI -p "generate image cat fly to the moon" -o output_name -d directory_to_save -c env_file
  • for more details
        ./gemCLI -h

USING in YOUR CODE

install

  •   go get "github.com/hend41234/gem-flash-image"

sample use

  •   package main
    
      import (
      	"log"
    
      	"github.com/hend41234/gem-flash-image/genimage"
      	"github.com/hend41234/gem-flash-image/utilsfi"
      )
    
      func main() {
      	// sample usage CLI
      	// CLI()
    
      	// sample usage in your code
      	UseInYourCode()
      }
    
      func UseInYourCode() {
      	// input prompt
      	genimage.Promt = "create the picture the one person whos drinks"
      	// using env file for get GEMINI_API_KEY
      	utilsfi.LoadConfig(".env")
      	// or you input API KEY in your code
      	// newGen := genimage.GenerateImage("your_api_key")
      	newGen := genimage.GenerateImage()
    
      	if ok := genimage.ConvertDataToImage(newGen, "test_output", "person_drinking"); !ok {
      		log.Fatal("error generate image")
      	}
      }
      

note

in the env file, the key that using is GEMINI_API_KEY

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages