Spaces:
Sleeping
Sleeping
Update categories/random_/model.py
Browse files- categories/random_/model.py +16 -16
categories/random_/model.py
CHANGED
@@ -60,24 +60,24 @@ class InformationExtractedFromABillReceipt(BaseModel):
|
|
60 |
uids: str = Field(..., title="The bill number/invoice number")
|
61 |
#uids: UIDDict = Field(..., title="Invoice number and other UIDs")
|
62 |
total: float = Field(..., title="Total amount or price converted from the given currency to INR")
|
63 |
-
tax: Union[TaxItem, TaxItem1] = Field(..., title="The total tax amount")
|
64 |
-
name: str = Field(
|
65 |
-
|
66 |
-
|
67 |
-
)
|
68 |
-
currency: str = Field(
|
69 |
-
|
70 |
-
|
71 |
-
)
|
72 |
issue_date: date = Field(
|
73 |
..., title="The date the invoice was issued"
|
74 |
)
|
75 |
-
seller_details: SellerDetails = Field(..., title="Information about the seller")
|
76 |
summary: str = Field(..., title="5-6 words short summary of purchased good(s)")
|
77 |
|
78 |
-
@validator("currency")
|
79 |
-
@classmethod
|
80 |
-
def check_currency(cls, v: str) -> str:
|
81 |
-
|
82 |
-
|
83 |
-
|
|
|
60 |
uids: str = Field(..., title="The bill number/invoice number")
|
61 |
#uids: UIDDict = Field(..., title="Invoice number and other UIDs")
|
62 |
total: float = Field(..., title="Total amount or price converted from the given currency to INR")
|
63 |
+
# tax: Union[TaxItem, TaxItem1] = Field(..., title="The total tax amount")
|
64 |
+
# name: str = Field(
|
65 |
+
# ...,
|
66 |
+
# title="Name of the person/entity that the invoice item was charged or delivered to",
|
67 |
+
# )
|
68 |
+
# currency: str = Field(
|
69 |
+
# default="INR",
|
70 |
+
# title="The ISO 4217 code for the currency in which the prices in the invoice are (inferred from symbols, names, addresses, etc)",
|
71 |
+
# )
|
72 |
issue_date: date = Field(
|
73 |
..., title="The date the invoice was issued"
|
74 |
)
|
75 |
+
# seller_details: SellerDetails = Field(..., title="Information about the seller")
|
76 |
summary: str = Field(..., title="5-6 words short summary of purchased good(s)")
|
77 |
|
78 |
+
# @validator("currency")
|
79 |
+
# @classmethod
|
80 |
+
# def check_currency(cls, v: str) -> str:
|
81 |
+
# if not iso4217.Currency.__members__.get(v.lower()):
|
82 |
+
# raise ValidationError(f"{v} is not a valid ISO 4217 currency code")
|
83 |
+
# return v.upper()
|