Upload card.py with huggingface_hub
Browse files
card.py
CHANGED
@@ -1,9 +1,12 @@
|
|
1 |
-
from
|
|
|
2 |
|
3 |
from .artifact import Artifact
|
4 |
from .instructions import InstructionsDict, InstructionsList
|
5 |
from .loaders import Loader
|
|
|
6 |
from .operator import StreamingOperator
|
|
|
7 |
from .task import FormTask
|
8 |
from .templates import TemplatesDict, TemplatesList
|
9 |
|
@@ -11,10 +14,11 @@ from .templates import TemplatesDict, TemplatesList
|
|
11 |
class TaskCard(Artifact):
|
12 |
loader: Loader
|
13 |
task: FormTask
|
14 |
-
preprocess_steps: Optional[List[StreamingOperator]] = None
|
15 |
templates: Union[TemplatesList, TemplatesDict] = None
|
16 |
instructions: Union[InstructionsList, InstructionsDict] = None
|
17 |
|
|
|
18 |
class ICLCard(Artifact):
|
19 |
demos_pool_name: str = "demos_pool"
|
20 |
demos_pool_size: int = None
|
|
|
1 |
+
from dataclasses import dataclass
|
2 |
+
from typing import Dict, List, Optional, Union
|
3 |
|
4 |
from .artifact import Artifact
|
5 |
from .instructions import InstructionsDict, InstructionsList
|
6 |
from .loaders import Loader
|
7 |
+
from .normalizers import NormalizeListFields
|
8 |
from .operator import StreamingOperator
|
9 |
+
from .operators import AddFields, MapInstanceValues
|
10 |
from .task import FormTask
|
11 |
from .templates import TemplatesDict, TemplatesList
|
12 |
|
|
|
14 |
class TaskCard(Artifact):
|
15 |
loader: Loader
|
16 |
task: FormTask
|
17 |
+
preprocess_steps: Optional[List[Union[StreamingOperator, str]]] = None
|
18 |
templates: Union[TemplatesList, TemplatesDict] = None
|
19 |
instructions: Union[InstructionsList, InstructionsDict] = None
|
20 |
|
21 |
+
|
22 |
class ICLCard(Artifact):
|
23 |
demos_pool_name: str = "demos_pool"
|
24 |
demos_pool_size: int = None
|