https://github.com/weaviate-tutorials/crossword-ollama
Crossword generator using Ollama
https://github.com/weaviate-tutorials/crossword-ollama
Last synced: about 1 year ago
JSON representation
Crossword generator using Ollama
- Host: GitHub
- URL: https://github.com/weaviate-tutorials/crossword-ollama
- Owner: weaviate-tutorials
- License: bsd-3-clause
- Created: 2024-09-04T19:02:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-05T19:18:42.000Z (over 1 year ago)
- Last Synced: 2025-02-03T18:11:22.323Z (over 1 year ago)
- Language: Jupyter Notebook
- Size: 2.69 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Crossword Puzzle Generator
This repository contains code that creates clues and answers for a topic
that you supply. It uses the clue-answer pairs to create a crossword puzzle.
The project uses an LLM from [Ollama](https://ollama.com/) that is hosted
locally. Ollama provides an interface to the LLM.
The first notebook shows you how to import data and create a collection that
you can use to generate the clue-answer pairs. The example uses Sherlock Holmes
as a subject. You can also change the subject and the input data.
The other notebook generates the puzzle.
## Get started
There are two notebooks in the `jupyter-notebooks` directory:
- [`crossword-setup.ipynb`](#crcrossword-setupipynb)
- [`crossword-create-puzzle.ipynb`](#crossword-create-puzzleipynb).
### crossword-setup.ipynb
The `crossword-setup.ipynb` notebook does these things:
- Gathers prerequisites
- Sets up a collection
- Imports data
- Connects you to a locally hosted LLM
### crossword-create-puzzle.ipynb
The `crossword-create-puzzle.ipynb` notebook does these things:
- Creates a list of puzzle answers
- Creates clues for each answer
- Uses the clue-answer pairs to generate a puzzle
## Requirements
This project requires Ollama. If haven't already installed Ollama, follow the
instructions on the Ollama website to download it.
There are sample data files from [Project Gutenberg](https://www.gutenberg.org/)
in the `inputs` folder. If you want to change the data in the collection, you
need to change the input files.
## Credits
The code that uses the list to generate a puzzle is a lightly modified version
of the [`crossword_helmig`](https://github.com/jeremy886/crossword_helmig)
project.
The sample data is from [Project Gutenberg](https://www.gutenberg.org/).