Spaces:
Runtime error
Runtime error
Download scripts/quiz/hints.py from TangibleAI/mathtext-fastapi: direct link, hf CLI and curl.
- Browser
- Download file 344 Bytes
-
https://huggingface.co/spaces/TangibleAI/mathtext-fastapi/resolve/4063a48fdb585ff3ffab9bac16fc8eee5ded9ba7/scripts/quiz/hints.py
- Command line
-
hf download hf://spaces/TangibleAI/mathtext-fastapi@4063a48fdb585ff3ffab9bac16fc8eee5ded9ba7/scripts/quiz/hints.py
-
curl -L -o hints.py https://huggingface.co/spaces/TangibleAI/mathtext-fastapi/resolve/4063a48fdb585ff3ffab9bac16fc8eee5ded9ba7/scripts/quiz/hints.py
344 Bytes
| import random | |
| def generate_hint(start, step, difficulty): | |
| hints = [ | |
| f"What number is greater than {start} and less than {start + 2 * step}?" | |
| ] | |
| hint = random.choice(hints) | |
| output = { | |
| "text": hint, | |
| 'difficulty': difficulty, | |
| "question_numbers": [start, step, start + step] | |
| } | |
| return output |