Spaces:
Runtime error
Runtime error
m00913563 commited on
Commit ·
ff56225
1
Parent(s): 186c315
fix data type, no date
Browse files
models.py
CHANGED
|
@@ -1,18 +1,17 @@
|
|
| 1 |
from pydantic import BaseModel, Field
|
| 2 |
-
from
|
| 3 |
-
from typing import List, Union, Any
|
| 4 |
|
| 5 |
|
| 6 |
class Experience(BaseModel):
|
| 7 |
-
start:
|
| 8 |
-
end:
|
| 9 |
designation: str = Field(...)
|
| 10 |
company: str = Field(...)
|
| 11 |
experience_description: str = Field(...)
|
| 12 |
|
| 13 |
class Education(BaseModel):
|
| 14 |
-
start:
|
| 15 |
-
end:
|
| 16 |
major: str = Field(...)
|
| 17 |
campus: str = Field(...)
|
| 18 |
GPA: float = Field(...)
|
|
@@ -24,7 +23,6 @@ class CVExtracted(BaseModel):
|
|
| 24 |
achievements: List[str] = Field(...)
|
| 25 |
experiences: List[Experience] = Field(...)
|
| 26 |
educations: List[Education] = Field(...)
|
| 27 |
-
|
| 28 |
class InsertedText(BaseModel):
|
| 29 |
text: str
|
| 30 |
|
|
|
|
| 1 |
from pydantic import BaseModel, Field
|
| 2 |
+
from typing import List, Optional, Any
|
|
|
|
| 3 |
|
| 4 |
|
| 5 |
class Experience(BaseModel):
|
| 6 |
+
start: Optional[str] = Field(None, description="Start date in YYYY-MM-DD format")
|
| 7 |
+
end: Optional[str] = Field(None, description="End date in YYYY-MM-DD format")
|
| 8 |
designation: str = Field(...)
|
| 9 |
company: str = Field(...)
|
| 10 |
experience_description: str = Field(...)
|
| 11 |
|
| 12 |
class Education(BaseModel):
|
| 13 |
+
start: Optional[str] = Field(None, description="Start date in YYYY-MM-DD format")
|
| 14 |
+
end: Optional[str] = Field(None, description="End date in YYYY-MM-DD format")
|
| 15 |
major: str = Field(...)
|
| 16 |
campus: str = Field(...)
|
| 17 |
GPA: float = Field(...)
|
|
|
|
| 23 |
achievements: List[str] = Field(...)
|
| 24 |
experiences: List[Experience] = Field(...)
|
| 25 |
educations: List[Education] = Field(...)
|
|
|
|
| 26 |
class InsertedText(BaseModel):
|
| 27 |
text: str
|
| 28 |
|