detailed-resume-parser / output_model.py
khrek's picture
Upload 8 files
0d375ed
raw
history blame
833 Bytes
from __future__ import annotations
from typing import Any, Dict, List, Optional, Union
from pydantic import BaseModel, Field
class Work_experience(BaseModel):
position:List[str]
company:List[str]
start_date:Optional[str] = ""
end_date:Optional[str] = ""
description:Optional[str] = ""
location:Optional[List[str]] = []
class Education(BaseModel):
degree:str = ""
major:List[str] = []
university:List[str] = []
start_date:Optional[str] = ""
end_date:Optional[str] = ""
location:Optional[List[str]] = []
class Basic_info(BaseModel):
name: str
email : Optional[str] = ""
phone: Optional[str] = ""
class ModelOutput(BaseModel):
basic_info: Basic_info
education: Optional[List[Education]] = None
work_experience: Optional[List[Work_experience]] = None