Spaces:
Running
Running
Download app.py from surogate/doodle-decoder: direct link, hf CLI and curl.
- Browser
- Download file 861 Bytes
-
https://huggingface.co/spaces/surogate/doodle-decoder/resolve/main/app.py
- Command line
-
hf download hf://spaces/surogate/doodle-decoder/app.py
-
curl -L -o app.py https://huggingface.co/spaces/surogate/doodle-decoder/resolve/main/app.py
861 Bytes
| from pathlib import Path | |
| import live | |
| HERE = Path(__file__).parent | |
| WORDS = ["cat", "dog", "fish", "bird", "house", "tree", "flower", "sun", "moon", "star", "car", "bicycle", | |
| "boat", "airplane", "train", "rocket", "cup", "chair", "table", "lamp", "clock", "key", "umbrella", | |
| "hat", "shoe", "glasses", "guitar", "pizza", "apple", "banana", "ice cream", "cake", "heart", | |
| "smiley face", "snake", "spider", "butterfly", "mountain", "cloud", "lightning", "snowman", | |
| "ghost", "crown", "sword", "light bulb", "phone", "envelope", "scissors", "pencil", "eye"] | |
| def questions(context): | |
| return ("A sketch drawn by a person in a guessing game.", {"guess": { | |
| "type": "choice", "instructions": "What is this sketch meant to be?", | |
| "criteria": {w: w for w in WORDS}}}) | |
| app = live.make_app(questions, HERE / "static") | |