Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text Generation with Gemini

Generates stories, poems and completions from a prompt — locally with a seeded Markov generator, or in "quality" mode through the Gemini API when a GEMINI_API_KEY is configured.

Quickstart

pip install -r requirements.txt
python -m text_generation_gemini generate --prompt "the lighthouse" --seed 42
python -m text_generation_gemini generate --prompt "a letter from the coast" --mode quality

How it works

  • markov.py — order-2 Markov chain trained on a bundled literary corpus (seeded, deterministic).
  • generator.py — a thin Client wrapper around the Gemini API with a local fallback (generate_local) used when no key is set.

Notes

Copy .env.example to .env and set GEMINI_API_KEY to enable quality mode. Local mode works fully offline.

License

MIT

About

Text generation with a seeded local Markov generator and optional Gemini quality mode.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages