Download code/drex_max/types.py from nace-ai/drex-max-v1: direct link, hf CLI and curl.
- Browser
- Download file 929 Bytes
-
https://huggingface.co/nace-ai/drex-max-v1/resolve/main/code/drex_max/types.py
- Command line
-
hf download hf://nace-ai/drex-max-v1/code/drex_max/types.py
-
curl -L -o types.py https://huggingface.co/nace-ai/drex-max-v1/resolve/main/code/drex_max/types.py
929 Bytes
| from pathlib import Path | |
| from typing import Literal, NotRequired, TypedDict | |
| from PIL import Image | |
| JSONValue = str | int | float | bool | None | list["JSONValue"] | dict[str, "JSONValue"] | |
| Content = str | dict[str, JSONValue] | list[JSONValue] | |
| ImageInput = str | Path | Image.Image | |
| class ChoiceQuestion(TypedDict): | |
| type: Literal["choice"] | |
| instructions: NotRequired[Content | None] | |
| criteria: dict[str, Content | None] | |
| class NoulQuestion(TypedDict): | |
| type: Literal["noul"] | |
| instructions: NotRequired[Content | None] | |
| criteria: NotRequired[dict[Literal["true", "false"], Content | None] | None] | |
| class ScoreQuestion(TypedDict): | |
| type: Literal["score"] | |
| instructions: NotRequired[Content | None] | |
| criteria: list[Content] | |
| Question = ChoiceQuestion | NoulQuestion | ScoreQuestion | |
| class DecisionInput(TypedDict): | |
| state: Content | |
| question: Question | |
| images: NotRequired[list[ImageInput]] | |