Skip to content

Commit

Permalink
feat: add some missing fields
Browse files Browse the repository at this point in the history
  • Loading branch information
larry-neil-1206 committed Nov 22, 2024
1 parent 461ebfd commit 44a8840
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion my_proof/models/proof_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ class ProofResponse(BaseModel):
uniqueness: float = 0.0
quality: float = 0.0
ownership: float = 1.0
authenticity: float = 1.0
authenticity: float = 1.0
attributes: Dict[str, Any] = {}
11 changes: 9 additions & 2 deletions my_proof/proof.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,18 @@ def generate(self) -> ProofResponse:
self.proof_response.both_sides = qualityRes['Both_Sides']['score']
self.proof_response.model_distribution = qualityRes['Model_Distribution']['score']
self.proof_response.poison_data = qualityRes['Poisin_Data']['score']

self.proof_response.uniqueness = Uniqueness(input_data, self.aws_access_key_id, self.aws_secret_access_key)

# original fields
self.proof_response.quality = qualityRes['score']
self.proof_response.ownership = 1.0
self.proof_response.authenticity = 1.0

self.proof_response.uniqueness = Uniqueness(input_data, self.aws_access_key_id, self.aws_secret_access_key)
self.proof_response.attributes = {
'total_score': qualityRes['score'],
'score_threshold': qualityRes['score'],
'email_verified': True,
}

return self.proof_response

Expand Down

0 comments on commit 44a8840

Please sign in to comment.