Spaces:
No application file
No application file
Update MyModel.py
Browse files- tools/MyModel.py +11 -0
tools/MyModel.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Template for custom function or Pydantic model."""
|
| 2 |
+
|
| 3 |
+
from pydantic import BaseModel
|
| 4 |
+
from pydantic import Field
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
class MyModel(BaseModel):
|
| 8 |
+
"""My model."""
|
| 9 |
+
|
| 10 |
+
attr1: str = Field(..., description="The first attribute.")
|
| 11 |
+
attr2: int = Field(..., description="The second attribute.")
|