title | emoji | colorFrom | colorTo | sdk | app_port |
---|---|---|---|---|---|
Mesop Jeopardy |
🤓 |
blue |
purple |
docker |
7860 |
Simple jeopardy game built using Mesop. User answers are checked using the Gemini API.
In order to run the app, you will need a Google API Key for Gemini Pro. You can create one using the instructions at https://ai.google.dev/gemini-api/docs/api-key.
git clone [email protected]:richard-to/mesop-jeopardy.git
cd mesop-jeopardy
pip install -r requirements.txt
GOOGLE_API_KEY=<your-api-key> mesop main.py
You can try out a demo here on Hugging Face Spaces.
One thing to note is I haven't included the jeopardy.json file. I'm using an old dataset of 200K questions that's about 10 years old now. You can find it with a quick Google search.
The file needs to be added to the data folder and named jeopardy.json. The format is like this
{
"category": "HISTORY",
"air_date": "2004-12-31",
"question": "'For the last 8 years of his life, Galileo was...",
"value": "$200",
"answer": "Copernicus",
"round": "Jeopardy!",
"show_number": "4680"
}
If you do not want to use the existing Jeopardy data set, you can set the environment
variable GENERATE_JEOPARDY_QUESTIONS=True
to generate the questions from Gemini.
This repository also contains configuration to deploy to GCP App Engine, GCP Cloud Run, or using Docker.
The instructions below assume you have a jeopardy.json
file in the data folder and
that you have a Google API Key to make Gemini API calls.
This section shows how to run Mesop Jeopardy from a Docker image.
Make sure Docker and Docker Compose are installed.
In the docker-compose.yml
set the Google API Key.
environment:
- GOOGLE_API_KEY=YOUR-API-KEY-HERE
Run this command in the repository working directory:
docker-compose up -d
The app should now be viewable at localhost:8080.
This section describes how to deploy Mesop Jeopardy with App Engine Flexible.
This section assumes that you have a properly configured Google Cloud Platform (GCP) account (e.g. GCP project to use, Billing enabled, Google Cloud CLI installed).
See the instructions here: https://cloud.google.com/appengine/docs/flexible/python/create-app#before-you-begin
gcloud app create --project=[YOUR_PROJECT_ID]
gcloud components install app-engine-python
Set your Google API key in app.yaml
.
env_variables:
GOOGLE_API_KEY: YOUR-API-KEY
Run this command in the repository working directory.
gcloud app deploy
gcloud app browse
This section describes how to deploy Mesop Jeopardy with Cloud Run.
This section assumes that you have a properly configured Google Cloud Platform (GCP) account (e.g. GCP project to use, Billing enabled, Google Cloud CLI installed).
See the instructions here: https://cloud.google.com/run/docs/quickstarts/build-and-deploy/deploy-python-service#before-you-begin
Run this command in the repository working directory.
gcloud run deploy mesop-jeopardy \
--source . \
--set-env-vars GOOGLE_API_KEY=API_KEY \
--region us-east4
When the deploy command is done, you should see a URL to the Cloud Run app.
Here are some screenshots of the UI.

