Skip to content

Commit

Permalink
Fixed errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Mich-31 committed Jan 8, 2024
1 parent f0b0c4f commit 030fe4e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/api/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PredictContextPayload(BaseModel):
contexts: str

@validator("target_word")
def target_word_nonempty(self, v):
def target_word_nonempty(cls, v):

""" Method to verify that the target word is not empty """

Expand All @@ -23,7 +23,7 @@ def target_word_nonempty(self, v):
return v

@validator("contexts")
def check_contexts(self, contexts, values):
def check_contexts(cls, contexts, values):

""" Method to check the contexts """

Expand Down Expand Up @@ -55,7 +55,7 @@ class PredictImagesPayload(BaseModel):
context: str

@validator("target_word")
def target_word_nonempty(self, v):
def target_word_nonempty(cls, v):

""" Method to verify that the target word is not empty """

Expand All @@ -64,7 +64,7 @@ def target_word_nonempty(self, v):
return v

@validator("context")
def check_context(self, context, values):
def check_context(cls, context, values):

""" Method to check the contexts """

Expand Down

0 comments on commit 030fe4e

Please sign in to comment.