Skip to main content

This package contains implementation of a random generator with Google Gemini AI integrated into it.

Project description

gemini_random_generator

Gemini Random Generator is a random generator which can generate random texts, with Google Gemini AI integrated into it.

Source Code

The source code of the application Gemini Random Generator is available in Source Code.

Installation

pip install gemini_random_generator

How to Use the Application?

Pre-requisites:

  1. Python installed in your device.
  2. .env file in the same directory as <GEMINI_RANDOM_GENERATOR_DIRECTORY> and has the value of GEMINI_API_KEY.
cd <GEMINI_RANDOM_GENERATOR_DIRECTORY>
python3 gemini_random_generator.py

Note: Replace <GEMINI_RANDOM_GENERATOR_DIRECTORY> with the path to the directory of the application Gemini Random Generator.

Then, the application will start with something looking like in the screenshot below.

Application

You will then be asked to input the following values.

  1. Temperature - between 0 and 1 inclusive
  2. Top P - between 0 and 1 inclusive
  3. Top K - at least 1
  4. Max output tokens - at least 1

The following screenshot shows what is displayed after inputting the mentioned values.

File Path Input

You will be required to input the path to the .rndgen file you want to parse. Then, you will be asked to enter the path of the text file you want the randomly generated text to be placed in.

Text File Path Input

After that, the text file containing the randomly generated text will be created.

Then, you will be asked whether you want to continue using the application or not. Enter "Y" for yes. Enter anything else for no.

Continuation

Output Text File

The output text file containing randomly generated text looks like below.

Output Text File

.rndgen File

An .rndgen file is a script containing text with some variables to be replaced with random texts. Such variables are the words enclosed in ${}. Below are some screenshots of how .rndgen files look like.

Sample File 1

Sample File 2

Sample File 3

Project details


Release history Release notifications | RSS feed

This version

1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gemini_random_generator-1.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

gemini_random_generator-1-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page